Test::MockModule lets you temporarily redefine subroutines in other packages for the purposes of unit testing. WWW: http://search.cpan.org/dist/Test-MockModule