Flag the VMS-problem-causing part of :encoding
[p5sagit/p5-mst-13.2.git] / utils / dprofpp.PL
index b1379bf..1ef0b19 100644 (file)
@@ -693,7 +693,7 @@ sub parsestack {
                chop;
                if (/^&/) {
                  ($dir, $id, $pack, $name) = split;
-                 if ($opt_R and ($name =~ /::(__ANON_|END)$/)) {
+                 if ($opt_R and ($name =~ /(?:::)?(__ANON__|END)$/)) {
                    $name .= "($id)";
                  }
                  $cv_hash{$id} = "$pack\::$name";
@@ -830,7 +830,7 @@ sub exitstamp {
                die "Garbled profile, missing an enter time stamp";
        }
        if( $x->[0] ne $name and $opt_G and ($name =~ /$opt_G/)){
-         if ($x->[0] =~ /::AUTOLOAD$/) {
+         if ($x->[0] =~ /(?:::)?AUTOLOAD$/) {
            if ($opt_A) {
              $name = $x->[0];
            }
@@ -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: $!";
        }
 }