in reply to Re: intercept nonexistent methods call
in thread intercept nonexistent methods call
Thank you for reply.
Forgot to say: subclass - is a test mock module, so I have Module & Module::Mock.
In tests I redefine like this
And yes, you are right - maybe I not need inheritance from "real" class. Then I can control all methods calls.
Forgot to say: subclass - is a test mock module, so I have Module & Module::Mock.
In tests I redefine like this
I want to see what methods called from this test module.local *Module::new = sub { Module::Mock->new(); };
And yes, you are right - maybe I not need inheritance from "real" class. Then I can control all methods calls.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: intercept nonexistent methods call
by Bor (Beadle) on Aug 04, 2011 at 11:24 UTC |
In Section
Seekers of Perl Wisdom