>On first read of Greg's code I thought he was suggesting modifying the >class under test to incorporate the extra decision logic, but taking a >second look after seeing your take above, I see the idea was to >externally inject a wrapper with instance detection logic. This could be >a good approach for stubbing out a method in a class under test.
I had a feeling we were on different wavelengths, just wasn't sure where the miscommunication was occurring. The externally inject a wrapper idea was what I was trying to convey. It's basically what I did with Devel::AutoProfiler. Which is an idea I got from Damian's Lexical Wrap thingy. Which, at least at one point in time, did something similar to what I posted here as far as externally injecting a sub with pre-sub, original-sub, and post-sub calls. _______________________________________________ Boston-pm mailing list [email protected] http://mail.pm.org/mailman/listinfo/boston-pm

