$ ENDIF
$!
$ usedl="define"
-$ startperl="""$ perl 'f$env(\""procedure\"")' 'p1' 'p2' 'p3' 'p4' 'p5' 'p6' 'p7' 'p8' !\n$ exit++ + ++$status != 0 and $exit = $status = undef;"""
+$ startperl="""$ perl 'f$env(\""procedure\"")' \""'"+"'p1'\"" \""'"+"'p2'\"" \""'"+"'p3'\"" \""'"+"'p4'\"" \""'"+"'p5'\"" \""'"+"'p6'\"" \""'"+"'p7'\"" \""'"+"'p8'\""!\n"
+$ startperl=startperl + "$ exit++ + ++$status!=0 and $exit=$status=undef; while($ARGV[$#ARGV] eq '"+"'){pop @ARGV;}"""
$!
$ IF ((Use_Threads) .AND. (vms_ver .LES. "6.2"))
$ THEN
}
END {
- unlink 'tmon.out', 'err';
+ while(-e 'tmon.out' && unlink 'tmon.out') {}
+ while(-e 'err' && unlink 'err') {}
}
use Benchmark qw( timediff timestr );
# -I Add to @INC
# -p Name of perl binary
-@tests = @ARGV ? @ARGV : sort <lib/dprof/*_t lib/dprof/*_v>; # glob-sort, for OS/2
+@tests = @ARGV ? @ARGV : sort (<lib/dprof/*_t>, <lib/dprof/*_v>); # glob-sort, for OS/2
$path_sep = $Config{path_sep} || ':';
$perl5lib = $opt_I || join( $path_sep, @INC );
my $opt_d = '-d:DProf';
my $t_start = new Benchmark;
- open( R, "$perl $opt_d $test |" ) || warn "$0: Can't run. $!\n";
+ open( R, "$perl \"$opt_d\" $test |" ) || warn "$0: Can't run. $!\n";
@results = <R>;
close R;
my $t_total = timediff( new Benchmark, $t_start );
print @results
}
- print timestr( $t_total, 'nop' ), "\n";
+ print '# ',timestr( $t_total, 'nop' ), "\n";
}
sub verify {
my $test = shift;
- system $perl, '-I../lib', '-I./lib/dprof', $test,
+ system $perl, '"-I../lib"', '"-I./lib/dprof"', $test,
$opt_v?'-v':'', '-p', $perl;
}
print "1..18\n";
while( @tests ){
$test = shift @tests;
+ $test =~ s/\.$// if $^O eq 'VMS';
if( $test =~ /_t$/i ){
print "# $test" . '.' x (20 - length $test);
profile $test;
$results = $expected = '';
$perl = $opt_p || $^X;
$dpp = $opt_d || '../utils/dprofpp';
+$dpp .= '.com' if $^O eq 'VMS';
print "\nperl: $perl\n" if $opt_v;
if( ! -f $perl ){ die "Where's Perl?" }
sub dprofpp {
my $switches = shift;
- open( D, "$perl -I../lib $dpp $switches 2> err |" ) || warn "$0: Can't run. $!\n";
+ open( D, "$perl \"-I../lib\" $dpp \"$switches\" 2> err |" ) || warn "$0: Can't run. $!\n";
@results = <D>;
close D;
@libexcl=('db-btree.t','db-hash.t','db-recno.t',
'gdbm.t','io_dup.t', 'io_pipe.t', 'io_poll.t', 'io_sel.t',
'io_sock.t', 'io_unix.t',
- 'ndbm.t','odbm.t','open2.t','open3.t', 'ph.t', 'posix.t', 'dprof.t');
+ 'ndbm.t','odbm.t','open2.t','open3.t', 'ph.t', 'posix.t');
# Note: POSIX is not part of basic build, but can be built
# separately if you're using DECC