move trace arguments to hash to make it more flexible
[p5sagit/App-FatPacker.git] / lib / App / FatPacker.pm
index 0c11330..4fc0c06 100644 (file)
@@ -93,8 +93,19 @@ sub script_command_trace {
     $arg .= "," . join ",", @additional_use;
   }
 
+  $self->trace(
+    output => $arg,
+    args   => $args,
+  );
+}
+
+sub trace {
+  my ($self, %opts) = @_;
+  my $output = $opts{'output'};
+  my $args = $opts{'args'};
+
   {
-    local $ENV{PERL5OPT} = '-MApp::FatPacker::Trace'.$arg;
+    local $ENV{PERL5OPT} = '-MApp::FatPacker::Trace'.$output;
     system $^X, @$args;
   }
 }