--- nfo/perl/libs/Data/Rap/Engine.pm 2003/06/24 20:59:51 1.12 +++ nfo/perl/libs/Data/Rap/Engine.pm 2004/05/12 14:23:31 1.14 @@ -1,7 +1,13 @@ ## ---------------------------------------------------------------------- -## $Id: Engine.pm,v 1.12 2003/06/24 20:59:51 jonen Exp $ +## $Id: Engine.pm,v 1.14 2004/05/12 14:23:31 jonen Exp $ ## ---------------------------------------------------------------------- ## $Log: Engine.pm,v $ +## Revision 1.14 2004/05/12 14:23:31 jonen +## add comment/code related to PERL5LIB var at different OS's +## +## Revision 1.13 2003/12/05 05:02:08 joko +## + minor update: disabled some unnecessary loggers or changed to debug-level +## ## Revision 1.12 2003/06/24 20:59:51 jonen ## added option 'detach' ## @@ -62,6 +68,7 @@ use Data::Mungle::Transform::Deep qw( expand deep_copy ); use File::Temp qw/ tempfile tempdir /; +my $DEBUG = 0; sub performTarget { my $self = shift; @@ -89,7 +96,7 @@ #$self->log($header, 'notice'); # V3 - $self->log("- " x 20, 'info'); + #$self->log("- " x 20, 'info'); $self->log("Performing Target '$targetname'.", 'notice'); #exit; @@ -162,12 +169,12 @@ my $options = shift; if (!$command) { - $self->log("Command was empty!", 'debug'); + $self->log("Command was empty!", 'debug') if $DEBUG; return; } # FIXME: make '__PACKAGE__' go one level deeper properly! - $self->log( __PACKAGE__ . "->perform_command: " . $command, 'debug'); + $self->log( __PACKAGE__ . "->perform_command: " . $command, 'debug') if $DEBUG; # 1. make arguments from list of arguments(?) @@ -210,7 +217,7 @@ } else { my $level = "debug"; $level = "warning" if $options->{warn}; - $self->log("Command '$command' not implemented.", $level); + $self->log("Command '$command' not implemented.", $level) if $DEBUG; } } @@ -337,7 +344,7 @@ $name = '__rap.properties.' . $name; - $self->log("get-name: $name"); + $self->log("get-name: $name") if $DEBUG; # get property slot and return value $result = ref_slot($self, $name, undef, '.'); @@ -413,11 +420,15 @@ #print "command: $cmd", "\n"; # start process - # V1: via shortcut - #$ENV{PERL5LIB} = join(' ', @INC); - - # FIXME!!! what about the other slots of @INC? + # 2004-05-11 - seems like only ONE args is valid at PERL5LIB, + # so we use V2! + # V1: join all args + #$ENV{PERL5LIB} = join(' ', @INC); + # V2: insert only FIRST arg $ENV{PERL5LIB} = $INC[0]; + # WARNING: at (free)BSD our var is the SECOND, NOT FIRST!! + # FIXME!! Do this in an abstract way!! + #$ENV{PERL5LIB} = $INC[1]; #print Dumper(%ENV);