On Wed, Jun 18, 2008 at 9:34 AM, David Cantrell <[EMAIL PROTECTED]> wrote:
> FWIW, instead of mocking File::HomeDir, my approach would be to wrap all
> uses of it in a tiny function:
>
>  sub _gethomedir { return File::HomeDir->my_home(); }
>
> and then when testing my module that uses it, do this in the test suite:

That works if it's all in my control.  But if I'm depending on other
modules and *they* look at File::HomeDir, then I need to mock it.

David

Reply via email to