This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
install useful Regexp::CARP_TRACE from Carp
[perl5.git] / dist / Carp / t / vivify_gv.t
CommitLineData
6ffbec2c 1BEGIN { print "1..5\n"; }
40c2103f 2
778a861b
Z
3our $has_is_utf8; BEGIN { $has_is_utf8 = exists($utf8::{"is_utf8"}); }
4our $has_dgrade; BEGIN { $has_dgrade = exists($utf8::{"downgrade"}); }
6ffbec2c 5our $has_swashnew; BEGIN { $has_swashnew = exists($utf8::{"SWASHNEW"}); }
bd098b9a 6our $has_strval; BEGIN { $has_strval = exists($overload::{"StrVal"}); }
f864cbea 7our $has_sv2obj; BEGIN { $has_sv2obj = exists($B::{"svref_2object"}); }
40c2103f 8
778a861b 9use Carp;
e94bb470 10sub { sub { Carp::longmess("x") }->() }->(\1, "\x{2603}", qr/\x{2603}/);
40c2103f 11
778a861b
Z
12print !(exists($utf8::{"is_utf8"}) xor $has_is_utf8) ? "" : "not ", "ok 1\n";
13print !(exists($utf8::{"downgrade"}) xor $has_dgrade) ? "" : "not ", "ok 2\n";
6ffbec2c
Z
14print !(exists($utf8::{"SWASHNEW"}) xor $has_swashnew) ? "" : "not ", "ok 3\n";
15print !(exists($overload::{"StrVal"}) xor $has_sv2obj) ? "" : "not ", "ok 4\n";
16print !(exists($B::{"svref_2object"}) xor $has_sv2obj) ? "" : "not ", "ok 5\n";
40c2103f
Z
17
181;