From: Gurusamy Sarathy Date: Tue, 20 Jul 1999 07:56:19 +0000 (+0000) Subject: another DProf build tweak X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=51e5ddcf11fb0f6bb47e63ed55c7ffc82e8891e9;p=p5sagit%2Fp5-mst-13.2.git another DProf build tweak p4raw-id: //depot/perl@3711 --- diff --git a/utils/dprofpp.PL b/utils/dprofpp.PL index c513062..451b8bf 100644 --- a/utils/dprofpp.PL +++ b/utils/dprofpp.PL @@ -18,21 +18,19 @@ $file =~ s/\.pl$// if ($Config{'osname'} eq 'VMS' or $Config{'osname'} eq 'OS2'); # "case-forgiving" -print "Pulling version from Makefile for dprofpp...\n"; +my $dprof_pm = '../ext/Devel/DProf/DProf.pm'; my $VERSION = 0; -open( MK, "){ - if( /^VERSION\s*=\s*(\d+)/ ){ +open( PM, "<$dprof_pm" ) || die "Can't open $dprof_pm: $!"; +while(){ + if( /^\$Devel::DProf::VERSION\s*=\s*'(\d+)'/ ){ $VERSION = $1; last; } } -close MK; +close PM; if( $VERSION == 0 ){ - die "Did not find VERSION in Makefile"; + die "Did not find VERSION in $dprof_pm"; } -print " version is ($VERSION).\n"; - open OUT,">$file" or die "Can't create $file: $!"; print "Extracting $file (with variable substitutions)\n";