in reply to Re: Simulating the absence of a module
in thread Simulating the absence of a module

I think Test::MockObject is what you're looking for.

Nope. T::MO is about faking existing packages, not pretending a package doesn't exist.

  • Comment on Re^2: Simulating the absence of a module

Replies are listed 'Best First'.
Re^3: Simulating the absence of a module
by Mutant (Priest) on Jul 05, 2005 at 08:13 UTC
    You can use it for that purpose though. See the tutorial on perl.com.
      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');