1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
use strict;
use warnings;
use lib 't/lib';
use Test::Deep;
use Test::More 0.88;
{
$@ = 'hello';
any(123);
is($@, 'hello', q{dynamically loaded test doesn't overwrite $@} );
}
{
$! = 11;
all(123);
is( 0 + $!, 11, q{dynamically loaded test doesn't overwrite $!} );
}
{
$^E = 11;
re(qr{a});
is( 0 + $^E, 11, q{dynamically loaded test doesn't overwrite $^E} );
}
{
$@ = 'hello';
cmp_deeply(
'hello',
str($@),
'when passing $@ to str() it is not localized away from new'
);
}
done_testing;
|