From: Slaven_Rezic Date: Sun, 29 Jul 2007 05:10:46 +0000 (-0400) Subject: [rt.cpan.org #28537] PATCH for croak.t test failure X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a0a37f65bb1838466cf0fcf95607572c013d022a;p=p5sagit%2Fp5-mst-13.2.git [rt.cpan.org #28537] PATCH for croak.t test failure From: Slaven_Rezic via RT Message-Id: "The attached patch solves a possible failure in the croak.t test. It seems that in some version Config.pm pre-loads Carp.pm, causing the test to fail. The patch just makes sure that Config.pm is only loaded when building Storable within core perl." p4raw-id: //depot/perl@31664 --- diff --git a/ext/Storable/t/croak.t b/ext/Storable/t/croak.t index 57c51c0..96c7cb3 100644 --- a/ext/Storable/t/croak.t +++ b/ext/Storable/t/croak.t @@ -10,10 +10,13 @@ sub BEGIN { chdir('t') if -d 't'; @INC = ('.', '../lib'); } - require Config; import Config; - if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { - print "1..0 # Skip: Storable was not built\n"; - exit 0; + if ($ENV{PERL_CORE}) { + require Config; import Config; + %Config=%Config if 0; # cease -w + if ($Config{'extensions'} !~ /\bStorable\b/) { + print "1..0 # Skip: Storable was not built\n"; + exit 0; + } } }