summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2005-06-15 06:30:41 -0500
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-06-15 16:24:05 +0000
commitab019eaa775fdcae8aaf709315c7ba85a788ee6c (patch)
tree475423bc731cde054c3ca96189d4c48b893ac0cf /ext
parent4d56230864c7d2d21814f925d64f6987011e1924 (diff)
downloadperl-ab019eaa775fdcae8aaf709315c7ba85a788ee6c.tar.gz
Re: [PATCH] make -f invalid when USE_SITECUSTOMIZE isn't set
Message-ID: <20050615163040.GA14745@mccoy.peters.homeunix.org> p4raw-id: //depot/perl@24854
Diffstat (limited to 'ext')
-rw-r--r--ext/Devel/DProf/t/DProf.t6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/Devel/DProf/t/DProf.t b/ext/Devel/DProf/t/DProf.t
index bdd70b002b..84bc9272e3 100644
--- a/ext/Devel/DProf/t/DProf.t
+++ b/ext/Devel/DProf/t/DProf.t
@@ -17,6 +17,7 @@ END {
}
use Benchmark qw( timediff timestr );
+use Config;
use Getopt::Std 'getopts';
getopts('vI:p:');
@@ -45,10 +46,11 @@ sub profile {
my $test = shift;
my @results;
local $ENV{PERL5LIB} = $perl5lib;
+ my $opt_f = $Config{ccflags} =~ /USE_SITECUSTOMIZE/ ? '-f' : '';
my $opt_d = '-d:DProf';
my $t_start = new Benchmark;
- open( R, "$perl -f \"$opt_d\" $test |" ) || warn "$0: Can't run. $!\n";
+ open( R, "$perl $opt_f \"$opt_d\" $test |" ) || warn "$0: Can't run. $!\n";
@results = <R>;
close R or warn "Could not close: $!";
my $t_total = timediff( new Benchmark, $t_start );
@@ -76,7 +78,7 @@ $| = 1;
print "1..20\n";
while( @tests ){
$test = shift @tests;
- $test =~ s/\.$// if $^O eq 'VMS';
+ $test =~ s/\.$// if $^O eq 'VMS';
if( $test =~ /_t$/i ){
print "# $test" . '.' x (20 - length $test);
profile $test;