Update of /cvsroot/openinteract/OpenInteract2/sample/package
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29942/sample/package
Modified Files:
App.pm
Log Message:
OIN-72: be able to install an OI2 package from a CPAN dist
Index: App.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract2/sample/package/App.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** App.pm 1 Mar 2005 03:35:59 -0000 1.2
--- App.pm 9 Mar 2005 20:26:24 -0000 1.3
***************
*** 8,13 ****
@OpenInteract2::App::[% class_name %]::EXPORT = qw( install );
sub get_brick_name {
! return '[% package_name %]';
}
--- 8,24 ----
@OpenInteract2::App::[% class_name %]::EXPORT = qw( install );
+ my $NAME = '[% package_name %]';
+
+ sub new {
+ return OpenInteract2::App->new( $NAME );
+ }
+
+ sub get_brick {
+ require OpenInteract2::Brick;
+ return OpenInteract2::Brick->new( $NAME );
+ }
+
sub get_brick_name {
! return $NAME;
}
***************
*** 21,24 ****
--- 32,39 ----
}
+ OpenInteract2::App->register_factory_type( $NAME => __PACKAGE__ );
+
+ 1;
+
__END__
|