in reply to Re^2: Checking parameters passed to a third party module during testing (wrap)
in thread Checking parameters passed to a third party module during testing
How about some sample code? While I understand tye's sample, I fail to see how I can replace return $new->( @_ }; with a goto to accomplish the same result. How would the following change?
sub MIME::Lite::new { my ($self, %params) = @_; ok (exists $params{To}, 'To address present'); ok ($params{To} eq 'wibble@wobble', 'To address correct'); ... return $new->( @_ ); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Checking parameters passed to a third party module during testing (wrap)
by ammon (Sexton) on Oct 18, 2006 at 23:42 UTC |