Flag the VMS-problem-causing part of :encoding
[p5sagit/p5-mst-13.2.git] / utils / dprofpp.PL
index 8f6afe4..1ef0b19 100644 (file)
@@ -896,10 +896,12 @@ sub run_profiler {
        my $script = shift;
        my $profiler = shift;
        my $startperl = shift;
+       my @script_parts = split /\s+/, $script;
 
-       system $startperl, "-d:$profiler", $script;
+       system $startperl, "-d:$profiler", @script_parts;
        if( $? / 256 > 0 ){
-               die "Failed: $startperl -d:$profiler $script: $!";
+               my $cmd = join ' ', @script_parts;
+               die "Failed: $startperl -d:$profiler $cmd: $!";
        }
 }