An eval-BLOCK in the Carp test suite is misinterpreted by perl 5.6 as an
eval-STRING. Add a do-BLOCK wrapper inside the block to satisfy perl 5.6.
# test for '...::CARP_NOT used only once' warning from Carp
my $warning;
-eval {
+eval { do {
BEGIN {
local $SIG{__WARN__} = sub {
if ( defined $^S ) { warn $_[0] }
BEGIN {
eval { Carp::croak() };
}
-};
+} };
ok !$warning, q/'...::CARP_NOT used only once' warning from Carp/;
# Test the location of error messages.