Make that:
&warning_like( sub { warn "warning!" }, qr(warning), 'basic warning' +);
(note the &) so it will work even if the prototype gets loaded soon enough.
Update: Ah, yes, & prototypes don't have this problem like some other prototypes do.
- tye
In reply to Re^3: Test::Warn, 'use' vs 'require' (&)
by tye
in thread Test::Warn, 'use' vs 'require'
by asarih
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |