1#!/usr/bin/perl -w
2use strict;
3use Fatal qw(open);
4use Test::More tests => 2;
5use constant NO_SUCH_FILE => "xyzzy_this_file_is_not_here";
6
7eval {
8    open(my $fh, '<', NO_SUCH_FILE);
9};
10
11my $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+};
12
13like($@,$old_msg,"Backwards compat ugly messages");
14is(ref($@),"", "Exception is a string, not an object");
15