Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21789
Modified Files:
Package.pm Manage.pm
Log Message:
OIN-166: pass along additional information (invocation, OI2 version, date) to the procedures generating new files from templates
Index: Package.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Package.pm,v
retrieving revision 1.61
retrieving revision 1.62
diff -C2 -d -r1.61 -r1.62
*** Package.pm 24 Sep 2005 19:20:58 -0000 1.61
--- Package.pm 22 Oct 2005 21:56:03 -0000 1.62
***************
*** 504,507 ****
--- 504,512 ----
}
+ $params->{brick_vars} ||= {};
+ $params->{brick_vars}{invocation} = $params->{invocation};
+ $params->{brick_vars}{date} = scalar( localtime );
+ $params->{brick_vars}{oi2_version} = OpenInteract2::Context->version;
+
eval {
$class->_skel_create_subdirectories( $full_skeleton_dir );
Index: Manage.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Manage.pm,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -d -r1.51 -r1.52
*** Manage.pm 21 Sep 2005 12:33:31 -0000 1.51
--- Manage.pm 22 Oct 2005 21:56:03 -0000 1.52
***************
*** 44,47 ****
--- 44,52 ----
my $self = bless( { _status => [] }, $class );
+ if ( $params->{invocation} ) {
+ $self->invocation( $params->{invocation} );
+ delete $params->{invocation};
+ }
+
if ( ref $params eq 'HASH' ) {
while ( my ( $name, $value ) = each %{ $params } ) {
***************
*** 401,404 ****
--- 406,418 ----
+ sub invocation {
+ my ( $self, $invocation ) = @_;
+ if ( $invocation ) {
+ $self->{invocation} = $invocation;
+ }
+ return $self->{invocation};
+ }
+
+
########################################
# STATUS
|