Revision: 1163
Author: tim.bunce
Date: Thu Mar 11 02:57:07 2010
Log: Reverted r1158. More general approach to follow.
http://code.google.com/p/perl-devel-nytprof/source/detail?r=1163
Modified:
/trunk/t/42-global.t
=======================================
--- /trunk/t/42-global.t Wed Mar 10 14:22:37 2010
+++ /trunk/t/42-global.t Thu Mar 11 02:57:07 2010
@@ -5,7 +5,6 @@
use lib qw(t/lib);
use NYTProfTest;
-use Config qw(%Config);
use Data::Dumper;
use Devel::NYTProf::Run qw(profile_this);
@@ -29,20 +28,7 @@
my $subs = $profile->subname_subinfo_map;
my $begin = ($pre589) ? 'main::BEGIN' : 'main::be...@3';
-
- my $sub_count = 3;
- # perl executes something like the following BEGIN block early during
- # initialization when it is compiled with -DUSE_SITECUSTOMIZE:
- #
- # BEGIN { -f '$Config{sitelibexp}/sitecustomize.pl'} &&
do '$Config{sitelibexp}/sitecustomize.pl' }
- #
- # This will define an additional symbol 'main::be...@0' on Perl 5.8.9 and
later.
- # Unfortunately we cannot test $Config{usesitecustomize}
- # because it is not set correctly on Unix.
- # See also https://rt.cpan.org/Public/Bug/Display.html?id=53288
- ++$sub_count if $Config{ccflags} =~ /(?<!\w)-DUSE_SITECUSTOMIZE\b/
&& !$pre589;
-
- is scalar keys %$subs, $sub_count, "should be $sub_count subs (got
@{[ keys %$subs ]})";
+ is scalar keys %$subs, 3, "should be 3 subs (got @{[ keys %$subs
]})";
ok $subs->{$begin};
ok $subs->{'main::RUNTIME'};
ok $subs->{'main::foo'};
@@ -61,7 +47,7 @@
$subs = $profile->subs_defined_in_file($fid);
my $sub;
- is scalar keys %$subs, $sub_count, 'should be $sub_count subs';
+ is scalar keys %$subs, 3, 'should be 3 subs';
ok $sub = $subs->{$begin};
SKIP: {
skip "needs perl >= 5.8.9 or >= 5.10.1", 1 if $pre589;
--
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.
Group hosted at: http://groups.google.com/group/develnytprof-dev
Project hosted at: http://perl-devel-nytprof.googlecode.com
CPAN distribution: http://search.cpan.org/dist/Devel-NYTProf
To post, email: [email protected]
To unsubscribe, email: [email protected]