From 0fd3c67a8913fba185f7e8e81fed3b2aaea12ea7 Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Sun, 24 Jul 2011 18:11:37 +1000 Subject: B:: is pre-instantiated when B is static --- lib/Carp.t | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'lib/Carp.t') diff --git a/lib/Carp.t b/lib/Carp.t index 35272e51f9..253baac62f 100644 --- a/lib/Carp.t +++ b/lib/Carp.t @@ -6,6 +6,7 @@ BEGIN { use warnings; no warnings "once"; +use Config; my $Is_VMS = $^O eq 'VMS'; @@ -390,17 +391,23 @@ fresh_perl_like( 'Carp can handle UTF8-flagged strings after a syntax error', ); -fresh_perl_is( - q< - use Carp; - $SIG{__WARN__} = sub{}; - carp ("A duck, but which duck?"); - print "ok" unless exists $::{"B::"}; - >, - 'ok', - {}, - 'Carp does not autovivify *B::' -); +SKIP: +{ + skip("B:: always created when static", 1) + if $Config{static_ext} =~ /\bB\b/; + + fresh_perl_is( + q< + use Carp; + $SIG{__WARN__} = sub{}; + carp ("A duck, but which duck?"); + print "ok" unless exists $::{"B::"}; + >, + 'ok', + {}, + 'Carp does not autovivify *B::' + ); + } # New tests go here -- cgit v1.2.1