Blame t/backcompat.t

Packit 6427f8
#!/usr/bin/perl -w
Packit 6427f8
use strict;
Packit 6427f8
use Fatal qw(open);
Packit 6427f8
use Test::More tests => 2;
Packit 6427f8
use constant NO_SUCH_FILE => "xyzzy_this_file_is_not_here";
Packit 6427f8
Packit 6427f8
eval {
Packit 6427f8
    open(my $fh, '<', NO_SUCH_FILE);
Packit 6427f8
};
Packit 6427f8
Packit 6427f8
my $old_msg = qr{Can't open\(GLOB\(0x[0-9a-f]+\), <, xyzzy_this_file_is_not_here\): .* at \(eval \d+\)(?:\[.*?\])? line \d+\.?\s+main::__ANON__\('?GLOB\(0x[0-9a-f]+\)'?,\s*['"]<['"],\s*['"]xyzzy_this_file_is_not_here['"]\) called at \S+ line \d+\s+eval \Q{...}\E called at \S+ line \d+};
Packit 6427f8
Packit 6427f8
like($@,$old_msg,"Backwards compat ugly messages");
Packit 6427f8
is(ref($@),"", "Exception is a string, not an object");