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';
17 print "\nperl: $perl\n" if $opt_v;
18 if( ! -f $perl ){ die "Where's Perl?" }
19 if( ! -f $dpp ){ die "Where's dprofpp?" }
24 open( D, "$perl -I../lib $dpp $switches 2> err |" ) || warn "$0: Can't run. $!\n";
28 open( D, "<err" ) || warn "$0: Can't open: $!\n";
31 push( @results, @err ) if @err;
33 $results = qq{@results};
34 # ignore Loader (Dyna/Auto etc), leave newline
35 $results =~ s/^\w+Loader::import//;
36 $results =~ s/\n /\n/gm;
54 print "not ok $num\n";
55 print "\nResult\n{$results}\n";
56 print "Expected\n{$expected}\n";