3 use Getopt::Std 'getopts';
9 @EXPORT = qw( dprofpp $opt_v $results $expected report @results );
10 @EXPORT_OK = qw( notok ok $num );
13 $results = $expected = '';
14 $perl = $opt_p || $^X;
15 $dpp = $opt_d || '../utils/dprofpp';
16 $dpp .= '.com' if $^O eq 'VMS';
18 print "\nperl: $perl\n" if $opt_v;
19 if( ! -f $perl ){ die "Where's Perl?" }
21 ($dpp = $^X) =~ s@(^.*)[/|\\].*@$1/dprofpp@;
22 die "Where's dprofpp?" if( ! -f $dpp );
28 open( D, "$perl \"-I../lib\" $dpp \"$switches\" 2> err |" ) || warn "$0: Can't run. $!\n";
32 open( D, "<err" ) || warn "$0: Can't open: $!\n";
35 push( @results, @err ) if @err;
37 $results = qq{@results};
38 # ignore Loader (Dyna/Auto etc), leave newline
39 $results =~ s/^\w+Loader::import//;
40 $results =~ s/\n /\n/gm;
58 print "not ok $num\n";
59 print "\nResult\n{$results}\n";
60 print "Expected\n{$expected}\n";