summaryrefslogtreecommitdiff
path: root/dist/Carp/t/baduni_warnings.t
blob: c5c876ce4b643d30b8a50b3820393cf762a6efd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
BEGIN { print "1..1\n"; }

BEGIN { $^W = 1; }
BEGIN { $SIG{__WARN__} = sub { die "WARNING: $_[0]" }; }

use warnings;   # this may load Carp
use Carp ();

my $badstr = do { no warnings "utf8"; "\x{ffff}" };
sub dd { Carp::longmess() }
dd($badstr);

print "ok 1\n";

1;