in reply to Re^3: Simulating the absence of a module
in thread Simulating the absence of a module
You can use it for that purpose though. See the tutorial on perl.com.
++. You're right - my apologies. For those who've not come across this way of using T::MO before:
my $mock = Test::MockObject->new(); $mock->fake_module('Foo::Bar' => ( 'import' => sub { die "Foo::Bar could not be loaded" } )); use_ok('Foo::Bar');
|
|---|