6 use Test::More tests => 3 * 4;
10 return qr/^Indirect\s+call\s+of\s+method\s+"new"\s+on\s+object\s+"$pkg"\s+at\s+\(eval\s+\d+\)\s+line\s+$line/;
19 my ($code, $lines) = split /#+/, $_, 2;
20 $lines = eval "[ sort ($lines) ]";
22 diag "Couldn't parse line numbers: $@";
28 local $SIG{__WARN__} = sub { push @warns, "@_" };
29 eval "return; no indirect hook => sub { push \@lines, \$_[3] }; $code";
32 is $@, '', 'did\'t croak';
33 is_deeply \@warns, [ ], 'didn\'t warn';
34 is_deeply [ sort @lines ], $lines, 'correct line numbers';
44 my $x = new X; $x = new X; # 1, 1