pod2man, and
pod2text
splain Describe Perl warnings and errors
+ dprofpp Perl code profile post-processor
library files in $privlib and $archlib specified to
Configure, usually under /usr/local/lib/perl5/.
ext/Devel/DProf/DProf.xs Perl code profiler
ext/Devel/DProf/Makefile.PL Perl code profiler makefile writer
ext/Devel/DProf/Todo Perl code profiler todo list
-ext/Devel/DProf/dprofpp.PL Perl code profile post-processor
-ext/Devel/DProf/t/test1.pl Perl code profiler tests
-ext/Devel/DProf/t/test1.t Perl code profiler tests
-ext/Devel/DProf/t/test1.v Perl code profiler tests
-ext/Devel/DProf/t/test2.t Perl code profiler tests
-ext/Devel/DProf/t/test2.v Perl code profiler tests
-ext/Devel/DProf/t/test3.t Perl code profiler tests
-ext/Devel/DProf/t/test3.v Perl code profiler tests
-ext/Devel/DProf/t/test4.t Perl code profiler tests
-ext/Devel/DProf/t/test4.v Perl code profiler tests
-ext/Devel/DProf/t/test5.t Perl code profiler tests
-ext/Devel/DProf/t/test5.v Perl code profiler tests
-ext/Devel/DProf/t/test6.t Perl code profiler tests
-ext/Devel/DProf/t/test6.v Perl code profiler tests
-ext/Devel/DProf/test.pl Perl code profiler testsuite driver
ext/Devel/Peek/Changes Data debugging tool, changelog
ext/Devel/Peek/Makefile.PL Data debugging tool, makefile writer
ext/Devel/Peek/Peek.pm Data debugging tool, module and pod
t/lib/db-recno.t See if DB_File works
t/lib/dirhand.t See if DirHandle works
t/lib/dosglob.t See if File::DosGlob works
+t/lib/dprof.t Perl code profiler testsuite driver
+t/lib/dprof/test1_t Perl code profiler tests
+t/lib/dprof/test1_v Perl code profiler tests
+t/lib/dprof/test2_t Perl code profiler tests
+t/lib/dprof/test2_v Perl code profiler tests
+t/lib/dprof/test3_t Perl code profiler tests
+t/lib/dprof/test3_v Perl code profiler tests
+t/lib/dprof/test4_t Perl code profiler tests
+t/lib/dprof/test4_v Perl code profiler tests
+t/lib/dprof/test5_t Perl code profiler tests
+t/lib/dprof/test5_v Perl code profiler tests
+t/lib/dprof/test6_t Perl code profiler tests
+t/lib/dprof/test6_v Perl code profiler tests
t/lib/dumper-ovl.t See if Data::Dumper works for overloaded data
t/lib/dumper.t See if Data::Dumper works
t/lib/english.t See if English works
util.h Dummy header
utils/Makefile Extract the utility scripts
utils/c2ph.PL program to translate dbx stabs to perl
+utils/dprofpp.PL Perl code profile post-processor
utils/h2ph.PL A thing to turn C .h files into perl .ph files
utils/h2xs.PL Program to make .xs files from C header files
utils/perlbug.PL A simple tool to submit a bug report
NAME => 'Devel::DProf',
DISTNAME => 'DProf',
VERSION_FROM => 'DProf.pm',
- clean => { 'FILES' => 'tmon.out t/tmon.out t/err dprofpp T/tmon.out'},
- EXE_FILES => ['dprofpp'],
- PL_FILES => {'dprofpp.PL' => 'dprofpp'},
+ clean => { 'FILES' => 'tmon.out t/tmon.out t/err'},
XSPROTOARG => '-noprototypes',
DEFINE => '-DPERLDBf_NONAME=0x40 -DPERLDBf_GOTO=0x80 '
.'-DG_NODEBUG=32 -DPL_NEEDED',
},
MAN3PODS => {},
);
-
-sub MY::test_via_harness { "" }
-#sub MY::test_via_harness {
-# my( $self, $perl, $tests ) = @_;
-# my $t = quotemeta( $tests );
-# my $res;
-#
-# $res = $self->MM::test_via_harness( $perl, $tests );
-# $res =~ s/^(\s+)/$1-/;
-# $res =~ s/(&runtests)/\$\$switches $1/;
-# $res =~ s/(; runtests)/; \$\$switches=q{-d:DProf}$1/;
-# $res =~ s,$t,t/bug.t,;
-# $res;
-#}
-
-sub MY::test_via_script {
- my( $self, $perl, $script ) = @_;
- my $res;
-
- $res = $self->MM::test_via_script( $perl, $script );
- $res =~ s/(test.pl)/$1 -p $perl/;
- $res;
-}
+++ /dev/null
-END { print "main:: the end\n" }
-sub FOO::END { print "foo:: the end\n" }
-
-
-sub foo {
- my $x;
- my $y;
- print "in sub foo\n";
- for( $x = 1; $x < 100; ++$x ){
- bar();
- for( $y = 1; $y < 100; ++$y ){
- }
- }
-}
-
-sub bar {
- my $x;
- print "in sub bar\n";
- for( $x = 1; $x < 100; ++$x ){
- }
-}
-
-sub baz {
- print "in sub baz\n";
- bar();
- foo();
-}
-
-bar();
-baz();
-foo();
-
runpod2man('utils', $man1dir, $man1ext, 'perlbug');
runpod2man('utils', $man1dir, $man1ext, 'pl2pm');
runpod2man('utils', $man1dir, $man1ext, 'splain');
+runpod2man('utils', $man1dir, $man1ext, 'dprofpp');
runpod2man('x2p', $man1dir, $man1ext, 's2p');
runpod2man('x2p', $man1dir, $man1ext, 'a2p.pod');
runpod2man('pod', $man1dir, $man1ext, 'pod2man');
umask 022 unless $Is_VMS;
my @scripts = qw(utils/c2ph utils/h2ph utils/h2xs utils/perlbug utils/perldoc
- utils/pl2pm utils/splain utils/perlcc
+ utils/pl2pm utils/splain utils/perlcc utils/dprofpp
x2p/s2p x2p/find2perl
pod/pod2man pod/pod2html pod/pod2latex pod/pod2text
pod/pod2usage pod/podchecker pod/podselect);
\
$mandir/a2p.1 \
$mandir/c2ph.1 \
+ $mandir/dprofpp.1 \
$mandir/h2ph.1 \
$mandir/h2xs.1 \
$mandir/perlbug.1 \
-# perl
+#!perl
-require 5.003;
+BEGIN {
+ chdir( 't' ) if -d 't';
+ unshift @INC, '../lib';
+}
use Benchmark qw( timediff timestr );
use Getopt::Std 'getopts';
# -I Add to @INC
# -p Name of perl binary
-unless (-r 'dprofpp' and -M 'dprofpp' <= -M 'dprofpp.PL') {
- print STDERR "dprofpp out of date, extracting...\n";
- system 'perl', 'dprofpp.PL' and die 'perl dprofpp.PL: exit code $?, $!';
-}
-die "Need dprofpp, could not make it" unless -r 'dprofpp';
-
-chdir( 't' ) if -d 't';
-@tests = @ARGV ? @ARGV : sort <*.t *.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} || ':';
-if( -d '../blib' ){
- unshift @INC, '../blib/arch', '../blib/lib';
-}
$perl5lib = $opt_I || join( $path_sep, @INC );
$perl = $opt_p || $^X;
sub verify {
my $test = shift;
- system $perl, '-I.', $test, $opt_v?'-v':'', '-p', $perl;
+ system $perl, '-I../lib', '-I./lib/dprof', $test,
+ $opt_v?'-v':'', '-p', $perl;
}
$| = 1;
+print "1..18\n";
while( @tests ){
$test = shift @tests;
- print $test . '.' x (20 - length $test);
- if( $test =~ /t$/ ){
+ if( $test =~ /_t$/i ){
+ print "# $test" . '.' x (20 - length $test);
profile $test;
}
else{
package V;
use Getopt::Std 'getopts';
-getopts('vp:');
+getopts('vp:d:');
require Exporter;
@ISA = 'Exporter';
@EXPORT = qw( dprofpp $opt_v $results $expected report @results );
@EXPORT_OK = qw( notok ok $num );
-my $out = 0;
$num = 0;
$results = $expected = '';
$perl = $opt_p || $^X;
+$dpp = $opt_d || '../utils/dprofpp';
print "\nperl: $perl\n" if $opt_v;
if( ! -f $perl ){ die "Where's Perl?" }
+if( ! -f $dpp ){ die "Where's dprofpp?" }
sub dprofpp {
my $switches = shift;
- open( D, "$perl ../dprofpp $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;
}
sub ok {
- ++$out;
- print "ok $num, ";
+ print "ok $num\n";
}
sub notok {
- ++$out;
- print "not ok $num, ";
- if( $opt_v ){
- print "\nResult\n{$results}\n";
- print "Expected\n{$expected}\n";
- }
+ print "not ok $num\n";
+ print "\nResult\n{$results}\n";
+ print "Expected\n{$expected}\n";
}
-END { print "\n" if $out }
-
-
1;
main::foo
main::bar
};
-report 1, sub { $expected eq $results };
+report 5, sub { $expected eq $results };
dprofpp('-TF');
-report 2, sub { $expected eq $results };
+report 6, sub { $expected eq $results };
dprofpp( '-t' );
$expected =
main::foo
main::bar
};
-report 3, sub { $expected eq $results };
+report 7, sub { $expected eq $results };
dprofpp('-tF');
-report 4, sub { $expected eq $results };
+report 8, sub { $expected eq $results };
main::bar
main::foo
};
-report 1, sub { $expected eq $results };
+report 9, sub { $expected eq $results };
dprofpp('-TF');
$e2 = $expected =
main::bar
main::foo
};
-report 2, sub { $expected eq $results };
+report 10, sub { $expected eq $results };
dprofpp( '-t' );
$expected = $e1;
-report 3, sub { 1 };
+report 11, sub { 1 };
dprofpp('-tF');
$expected = $e2;
-report 4, sub { $expected eq $results };
+report 12, sub { $expected eq $results };
bar();
-fork;
+eval { fork };
bar();
baz();
main::foo
main::bar
};
-report 1, sub { $expected eq $results };
+report 13, sub { $expected eq $results };
dprofpp('-TF');
-report 2, sub { $expected eq $results };
+report 14, sub { $expected eq $results };
dprofpp( '-t' );
$expected =
main::foo
main::bar
};
-report 3, sub { $expected eq $results };
+report 15, sub { $expected eq $results };
dprofpp('-tF');
-report 4, sub { $expected eq $results };
+report 16, sub { $expected eq $results };
main::bar
main::yeppers
};
-report 1, sub { $expected eq $results };
+report 17, sub { $expected eq $results };
main::foo
main::bar
};
-report 1, sub { $expected eq $results };
+report 18, sub { $expected eq $results };
# Files to be built with variable substitution after miniperl is
# available. Dependencies handled manually below (for now).
-pl = c2ph.PL h2ph.PL h2xs.PL perlbug.PL perldoc.PL pl2pm.PL splain.PL perlcc.PL
-plextract = c2ph h2ph h2xs perlbug perldoc pl2pm splain perlcc
-plextractexe = c2ph.exe h2ph.exe h2xs.exe perlbug.exe perldoc.exe pl2pm.exe splain.exe perlcc.exe
+pl = c2ph.PL h2ph.PL h2xs.PL perlbug.PL perldoc.PL pl2pm.PL splain.PL perlcc.PL dprofpp.PL
+plextract = c2ph h2ph h2xs perlbug perldoc pl2pm splain perlcc dprofpp
+plextractexe = c2ph.exe h2ph.exe h2xs.exe perlbug.exe perldoc.exe pl2pm.exe splain.exe perlcc.exe dprofpp.exe
all: $(plextract)
perlcc: perlcc.PL ../config.sh
+dprofpp: dprofpp.PL ../config.sh
+
clean:
realclean:
# Modules which must be installed before we can build extensions
LIBPREREQ = $(ARCHDIR)Config.pm [.lib]DynaLoader.pm [.lib]vmsish.pm [.lib.VMS]Filespec.pm [.lib.ExtUtils]XSSymSet.pm
-utils1 = [.lib.pod]perldoc.com [.lib.ExtUtils]Miniperl.pm [.utils]c2ph.com [.utils]h2ph.com [.utils]h2xs.com [.lib]perlbug.com [.lib]perlcc.com
+utils1 = [.lib.pod]perldoc.com [.lib.ExtUtils]Miniperl.pm [.utils]c2ph.com [.utils]h2ph.com [.utils]h2xs.com [.lib]perlbug.com [.lib]perlcc.com [.utils]dprofpp.com
utils2 = [.lib]splain.com [.utils]pl2pm.com
.ifdef NOX2P
[.utils]c2ph.com : [.utils]c2ph.PL $(ARCHDIR)Config.pm
$(MINIPERL) $(MMS$SOURCE)
+[.utils]dprofpp.com : [.utils]dprofpp.PL $(ARCHDIR)Config.pm
+ $(MINIPERL) $(MMS$SOURCE)
+
[.utils]h2ph.com : [.utils]h2ph.PL $(ARCHDIR)Config.pm
$(MINIPERL) $(MMS$SOURCE)
UTILS = \
..\utils\h2ph \
..\utils\splain \
+ ..\utils\dprofpp \
..\utils\perlbug \
..\utils\pl2pm \
..\utils\c2ph \
-del /f $(PODDIR)\*.html
-del /f $(PODDIR)\*.bat
cd ..\utils
- -del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc pstruct
+ -del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc pstruct dprofpp
-del /f *.bat
cd ..\win32
cd ..\x2p
UTILS = \
..\utils\h2ph \
..\utils\splain \
+ ..\utils\dprofpp \
..\utils\perlbug \
..\utils\pl2pm \
..\utils\c2ph \
-del /f $(PODDIR)\*.html
-del /f $(PODDIR)\*.bat
-cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc \
- pstruct *.bat
+ dprofpp pstruct *.bat
-cd ..\x2p && del /f find2perl s2p *.bat
-del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
-del /f $(CONFIGPM)