1use strict; 2use warnings; 3 4# [perl #132910] 5# This mock-up breaks Test::More. Don’t use Test::More. 6 7{ 8 no warnings 'redefine'; 9 sub UNIVERSAL::can { die; } 10} 11 12# Carp depends on this to detect the override: 13BEGIN { no warnings 'portable'; $UNIVERSAL::can::VERSION = 0xbaff1ed_bee; } 14 15use Carp; 16 17eval { 18 sub { confess-sins }->(bless[], 'Foo'); 19}; 20print "1..1\n"; 21if ($@ !~ qr/^-sins at /) { 22 print "not ok 1\n"; 23 print "# Expected -sins at blah blah blah...\n"; 24 print "# Instead, we got:\n"; 25 $@ =~ s/^/# /mg; 26 print $@; 27} 28else { 29 print "ok 1\n"; 30} 31