lackita has asked for the wisdom of the Perl Monks concerning the following question:
I've got a test harness that captures emails by overriding the subroutine MIME::Lite::send. This works brilliantly about 90% of the time.
Unfortunately, I sometimes need to test subroutine Foo, which happens to have a system call and so my override loses its effect. If I'm calling the system call directly, I've got a module with an import method that can create the override using -M, but in the case where it's buried inside Foo that's not possible.
Does anybody know of a way that the override can persist into a system call? Or alternatively, a different method for capturing email in a test framework.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Capturing Email During Testing
by mcdave (Beadle) on Jan 31, 2012 at 17:21 UTC | |
|
Re: Capturing Email During Testing
by GrandFather (Saint) on Jan 31, 2012 at 19:35 UTC | |
|
Re: Capturing Email During Testing
by Anonymous Monk on Jan 31, 2012 at 14:41 UTC | |
|
Re: Capturing Email During Testing
by pklausner (Scribe) on Feb 01, 2012 at 10:53 UTC |