Perl-Sensitive Sunglasses | |
PerlMonks |
Test::MockObject and imported functionsby Mutant (Priest) |
on Mar 13, 2008 at 10:03 UTC ( [id://673932]=perlquestion: print w/replies, xml ) | Need Help?? |
Mutant has asked for the wisdom of the Perl Monks concerning the following question: Hi, I'm looking for a way of mocking a function that has been imported, e.g.
bar() may also be imported implicitly. I know about fake_module(), but the code above will try to call import() on the mock object I've created. Do I have to mock import and somehow hook it into Exporter to export the actual function I want to mock?
Back to
Seekers of Perl Wisdom
|
|