Put something like this in your test code:
my $new; BEGIN { require MIME::Lite; $new= MIME::Lite->can( "new" ); undef &MIME::Lite::new; } sub MIME::Lite::new { # validate passed-in arguments here return $new->( @_ ); }
(Updated to prevent warnings.)
- tye
In reply to Re: Checking parameters passed to a third party module during testing (wrap)
by tye
in thread Checking parameters passed to a third party module during testing
by GrandFather
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |