- eval "die qq{the code compiled but it shouldn't have\n}; no indirect; $_";
- like($@, qr/^warn:Indirect\s+call\s+of\s+method\s+"meh"\s+on\s+object\s+"Dongs"/, "no indirect, defined: $_");
+ try "return; $prefix; no indirect; $_";
+ is $@, '', "use indirect, defined: $_";
+ is @warns, 1, 'correct number of reports';
+ like $warns[0], qr/^Indirect call of method "meh" on object "Dongs" at \(eval \d+\) line \d+/, 'report 0 is correct';
+ }
+ }