in reply to Re: Testing -- making a new constructor behave differently for one package
in thread Testing -- making a new constructor behave differently for one package
Yeah, but that assumes that when you're designing Foo you want to hard code this test hook into the class. This seems like a bad plan for a number of reasons. Problem here is you need to test Foo after it's been created.
I actually tried to figure out how to add a method modifier from the Foo meta class so it only existed during my test case, but couldn't quite figure how to do that yet...so this was my plan B...but I eventually went to plan C after realizing (thanks Chromatic) I could hijack the accessor to the class name. That turned out to be far simpler :)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Testing -- making a new constructor behave differently for one package
by tobyink (Canon) on Jan 30, 2012 at 22:32 UTC | |
by tj_thompson (Monk) on Jan 31, 2012 at 17:59 UTC |
In Section
Seekers of Perl Wisdom