]> git.vpit.fr Git - perl/modules/indirect.git/blob - t/10-args.t
Rename some test files
[perl/modules/indirect.git] / t / 10-args.t
1 #!perl
2
3 use strict;
4 use warnings;
5
6 use Test::More tests => 1;
7
8 {
9  local $SIG{__WARN__} = sub { die 'warn:' . join(' ', @_) };
10  eval <<HERE;
11 die qq{shouldn't even compile\n};
12 no indirect ':fatal';
13 my \$x = new Hlagh;
14 \$x = new Fail;
15 HERE
16  like($@, qr/^Indirect\s+call\s+of\s+method\s+"new"\s+on\s+object\s+"Hlagh"/, 'croak when :fatal is specified');
17 }