--- nfo/perl/libs/Data/Rap/Command.pm 2003/02/21 07:39:13 1.3 +++ nfo/perl/libs/Data/Rap/Command.pm 2003/03/29 07:10:42 1.6 @@ -1,7 +1,17 @@ ## ---------------------------------------------------------------------- -## $Id: Command.pm,v 1.3 2003/02/21 07:39:13 joko Exp $ +## $Id: Command.pm,v 1.6 2003/03/29 07:10:42 joko Exp $ ## ---------------------------------------------------------------------- ## $Log: Command.pm,v $ +## Revision 1.6 2003/03/29 07:10:42 joko +## + sub _script: +## new rap-command: '' +## +## Revision 1.5 2003/03/27 15:31:04 joko +## fixes to modules regarding new namespace(s) below Data::Mungle::* +## +## Revision 1.4 2003/02/22 16:48:58 joko +## modified rapcall behaviour +## ## Revision 1.3 2003/02/21 07:39:13 joko ## modified 'rapcall' processing ## modified merging of options/arguments in there @@ -30,7 +40,7 @@ use Hash::Merge qw( merge ); use DesignPattern::Object; -use Data::Transform::Deep qw( merge_to ); +use Data::Mungle::Transform::Deep qw( merge_to ); use shortcuts qw( run_cmd ); @@ -215,11 +225,17 @@ if (my $container = $self->getContainer()) { #my $opts = merge($container, $args); - #print Dumper($opts); - merge_to($args, $container); + #print Dumper($container); + merge_to($args, $container, { init => 1 }); } - #print Dumper($args); + # trace + #print Dumper($args); + + if ($args->{executable}) { + $self->run_executable($args); + return; + } if (my $command = $args->{command}) { $self->perform_command($command, $args); @@ -246,12 +262,6 @@ return; } - - if ($args->{executable}) { - $self->run_executable($args); - return; - } - } @@ -267,6 +277,21 @@ $self->setInstance($self->{$name}) if $args->{type} eq 'instance'; } +sub _script { + my $self = shift; + my $args = shift; + my $content = shift; + + # trace + #print Dumper($args); + #print Dumper($content); + + my $code = $content->[0]->{content}; + $code ||= ''; + + $self->run_script($args, $code); + +} 1; __END__