I'm having a idiot moment... I'm trying to mock out some config reading tests for reading from MP1/MP2 even though I don't have either installed. so I thought "Test::MockObjext is the answer!".
The following code goes boom with a 'Can't locate object method request via package "Apache"': > use strict; > use warnings; > use Test::MockObject; > > my $mock = Test::MockObject->new; > $mock->fake_module('Apache'); > $mock->set_series(undef, $mockrequest); > > warn Apache->request; If I change the fake_module call to Test::MockObject->fake_module('Apache'), the code gets happt, but it appears I can then install subs into that Apache using any of the set_ helpers. Or am I just missing something? The pod mentions that fake_module is a class and object method, but doesn't really extol the virtues on when to use one over the other. Someone cluestick me please. -=Chris
signature.asc
Description: OpenPGP digital signature