remove misleading comment (from M.J.T. Guy)
[p5sagit/p5-mst-13.2.git] / utils / dprofpp.PL
index 0c57940..51e8d78 100644 (file)
@@ -14,15 +14,14 @@ use File::Basename qw(&basename &dirname);
 # This is so that make depend always knows where to find PL derivatives.
 chdir(dirname($0));
 ($file = basename($0)) =~ s/\.PL$//;
-$file =~ s/\.pl$//
-       if ($Config{'osname'} eq 'VMS' or
-           $Config{'osname'} eq 'OS2');  # "case-forgiving"
+$file =~ s/\.pl$// if ($Config{'osname'} eq 'OS2');      # "case-forgiving"
+$file =~ s/\.pl$/.com/ if ($Config{'osname'} eq 'VMS');  # "case-forgiving"
 
 my $dprof_pm = '../ext/Devel/DProf/DProf.pm';
 my $VERSION = 0;
 open( PM, "<$dprof_pm" ) || die "Can't open $dprof_pm: $!";
 while(<PM>){
-       if( /^\$Devel::DProf::VERSION\s*=\s*'(\d+)'/ ){
+       if( /^\$Devel::DProf::VERSION\s*=\s*'([\d._]+)'/ ){
                $VERSION = $1;
                last;
        }
@@ -45,7 +44,7 @@ $Config{'startperl'}
 
 require 5.003;
 
-my \$VERSION = $VERSION;
+my \$VERSION = '$VERSION';
 
 !GROK!THIS!
 
@@ -437,6 +436,8 @@ Main: {
 #
 sub settime {
   my( $runtime, $hz ) = @_;
+
+  $hz ||= 1;
   
   if( $opt_r ){
     $$runtime = ($rrun_rtime - $overhead - $over_rtime * $total_marks/$over_tests/2)/$hz;