in reply to Checking parameters passed to a third party module during testing
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Checking parameters passed to a third party module during testing (wrap)
by GrandFather (Saint) on Oct 19, 2006 at 04:03 UTC | |
by ammon (Sexton) on Oct 19, 2006 at 19:14 UTC | |
|
Re^2: Checking parameters passed to a third party module during testing (wrap)
by GrandFather (Saint) on Oct 18, 2006 at 18:31 UTC | |
|
Re^2: Checking parameters passed to a third party module during testing (wrap)
by ammon (Sexton) on Oct 18, 2006 at 19:30 UTC | |
by GrandFather (Saint) on Oct 18, 2006 at 20:28 UTC | |
by ammon (Sexton) on Oct 18, 2006 at 23:42 UTC |