# # This patch is needed for the DProf testsuite to pass # with perl5.003_97 and later. # # Apply with "patch -p1 -N < this_patch" in DProf toplevel. # --- DProf-19960930-old/DProf.pm Mon Sep 30 16:47:07 1996 +++ DProf-19960930/DProf.pm Sun Jan 5 12:10:07 1997 @@ -93,19 +93,13 @@ package DB; -# This sub is replaced by an XS version after the profiler is bootstrapped. -sub sub { -# print "nonXS DBsub($sub)\n"; - $single = 0; # disable DB single-stepping - if( wantarray ){ - @a = &$sub; - @a; - } - else{ - $a = &$sub; - $a; - } -} +# +# As of perl5.003_20, &DB::sub stub is not needed (some versions +# even had problems if stub was redefined with XS version). +# + +# disable DB single-stepping +BEGIN { $single = 0; } # This sub is needed during startup. sub DB { --- DProf-19960930-old/t/test1.v Mon Feb 5 19:19:22 1996 +++ DProf-19960930/t/test1.v Mon May 5 08:24:53 1997 @@ -3,8 +3,8 @@ use V; dprofpp( '-T' ); -$expected = qq{ -main::bar +$expected = +qq{main::bar main::baz main::bar main::foo --- DProf-19960930-old/t/test2.v Mon Feb 5 19:19:14 1996 +++ DProf-19960930/t/test2.v Mon May 5 08:25:21 1997 @@ -3,8 +3,8 @@ use V; dprofpp( '-T' ); -$expected = qq{ -main::bar +$expected = +qq{main::bar main::bar main::baz main::bar @@ -21,8 +21,8 @@ report 2, sub { $expected eq $results }; dprofpp( '-t' ); -$expected = qq{ -main::bar (2x) +$expected = +qq{main::bar (2x) main::baz main::bar (3x) main::foo --- DProf-19960930-old/t/test3.v Mon Feb 5 19:19:05 1996 +++ DProf-19960930/t/test3.v Mon May 5 08:26:07 1997 @@ -3,8 +3,8 @@ use V; dprofpp( '-T' ); -$e1 = $expected = qq{ -main::bar +$e1 = $expected = +qq{main::bar main::baz main::bar main::foo @@ -16,8 +16,8 @@ report 1, sub { $expected eq $results }; dprofpp('-TF'); -$e2 = $expected = qq{ -main::bar +$e2 = $expected = +qq{main::bar main::baz main::bar main::foo --- DProf-19960930-old/t/test4.v Wed Jun 26 12:42:55 1996 +++ DProf-19960930/t/test4.v Mon May 5 08:26:33 1997 @@ -3,8 +3,8 @@ use V; dprofpp( '-T' ); -$expected = qq{ -main::bar +$expected = +qq{main::bar main::bar main::baz main::bar @@ -21,8 +21,8 @@ report 2, sub { $expected eq $results }; dprofpp( '-t' ); -$expected = qq{ -main::bar (2x) +$expected = +qq{main::bar (2x) main::baz main::bar (3x) main::foo --- DProf-19960930-old/t/test5.v Mon Sep 30 16:31:49 1996 +++ DProf-19960930/t/test5.v Mon May 5 08:26:50 1997 @@ -3,8 +3,8 @@ use V; dprofpp( '-T' ); -$expected = qq{ -main::foo1 +$expected = +qq{main::foo1 main::bar main::yeppers main::foo2