2 # This is automatically generated by author/import-moose-test.pl.
3 # DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4 use t::lib::MooseCompat;
14 ::ok($@, '... got an error because strict is on');
15 ::like($@, qr/Global symbol \"\$foo\" requires explicit package name at/, '... got the right error');
19 local $SIG{__WARN__} = sub { $warn = $_[0] };
21 ::ok(!$warn, '... no warning yet');
23 eval 'my $bar = 1 + "hello"';
25 ::ok($warn, '... got a warning');
26 ::like($warn, qr/Argument \"hello\" isn\'t numeric in addition \(\+\)/, '.. and it is the right warning');
36 ::ok($@, '... got an error because strict is on');
37 ::like($@, qr/Global symbol \"\$foo\" requires explicit package name at/, '... got the right error');
41 local $SIG{__WARN__} = sub { $warn = $_[0] };
43 ::ok(!$warn, '... no warning yet');
45 eval 'my $bar = 1 + "hello"';
47 ::ok($warn, '... got a warning');
48 ::like($warn, qr/Argument \"hello\" isn\'t numeric in addition \(\+\)/, '.. and it is the right warning');
58 ::ok($@, '... got an error because strict is on');
59 ::like($@, qr/Global symbol \"\$foo\" requires explicit package name at/, '... got the right error');
63 local $SIG{__WARN__} = sub { $warn = $_[0] };
65 ::ok(!$warn, '... no warning yet');
67 eval 'my $bar = 1 + "hello"';
69 ::ok($warn, '... got a warning');
70 ::like($warn, qr/Argument \"hello\" isn\'t numeric in addition \(\+\)/, '.. and it is the right warning');