Update of /cvsroot/openinteract/OpenInteract2/sample/package_from_table
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29942/sample/package_from_table
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_from_table/App.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** App.pm 26 Feb 2005 23:07:03 -0000 1.1
--- App.pm 9 Mar 2005 20:26:25 -0000 1.2
***************
*** 5,13 ****
use OpenInteract2::Manage;
! $OpenInteract2::App::[% class_name %]::VERSION = '0.01';
@OpenInteract2::App::[% class_name %]::EXPORT = qw( install );
sub get_brick_name {
! return '[% package_name %]';
}
--- 5,24 ----
use OpenInteract2::Manage;
! $OpenInteract2::App::[% class_name %]::VERSION = sprintf("%d.%02d", q$Revision$ =~ /(\d+)\.(\d+)/);
@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__
***************
*** 29,57 ****
OpenInteract2::App::[% class_name %] - This application will do everything!
! =head1 SYNOPSIS
!
! =head1 DESCRIPTION
!
! =head1 OBJECTS
!
! No objects created by this application.
!
! =head1 ACTIONS
!
! No actions defined in this application.
!
! =head1 RULESETS
!
! No rulesets defined in this application.
!
! =head1 TASKS
!
! No management tasks defined in this application.
!
! =head1 SEE ALSO
!
! =head1 AUTHORS
!
! Who AmI E<lt>me...@wh...E<gt>
=cut
--- 44,48 ----
OpenInteract2::App::[% class_name %] - This application will do everything!
! [% pod %]
=cut
|