From 51e5ddcf11fb0f6bb47e63ed55c7ffc82e8891e9 Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Tue, 20 Jul 1999 07:56:19 +0000 Subject: [PATCH] another DProf build tweak p4raw-id: //depot/perl@3711 --- utils/dprofpp.PL | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) 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"; -- 1.8.3.1