X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FApp%2FFatPacker.pm;h=ccd01769c6c473c3964032b83784ba2488a63a66;hb=7a3662c8657b2d0b15a467e7b09cbd449bc5bb03;hp=0c11330dc82308f3c077652c575d6fbf73c99cb6;hpb=24d68aa2af19bc6d5b260ed2cf9564b798a41977;p=p5sagit%2FApp-FatPacker.git diff --git a/lib/App/FatPacker.pm b/lib/App/FatPacker.pm index 0c11330..ccd0176 100644 --- a/lib/App/FatPacker.pm +++ b/lib/App/FatPacker.pm @@ -89,12 +89,25 @@ sub script_command_trace { } }; - if(@additional_use) { - $arg .= "," . join ",", @additional_use; + $self->trace( + use => \@additional_use, + args => $args, + output => $arg, + ); +} + +sub trace { + my ($self, %opts) = @_; + my $use = $opts{'use'}; + my $args = $opts{'args'}; + my $output = $opts{'output'}; + + if(@$use) { + $output .= "," . join ",", @$use; } { - local $ENV{PERL5OPT} = '-MApp::FatPacker::Trace'.$arg; + local $ENV{PERL5OPT} = '-MApp::FatPacker::Trace'.$output; system $^X, @$args; } }