Calling UNIVERSAL::can() as a function is allowed. (was: [OT] best way to determine existence of a function in a package)

chromatic chromatic at
Wed Nov 21 22:44:14 GMT 2007

On Wednesday 21 November 2007 14:15:09 Matt S Trout wrote:

> You evidently didn't ask chromatic if he'd take a patch to make it possible
> to ask Test::MockObject not to load those (with the current behaviour
> staying as the default).
> I did. I'm pretty sure he said yes, although it was at a YAPC so I may have
> been hallucinating while drunk.

Which one are you again?

> Of course, I never did get around to the patch. Anybody got any spare
> tuits?

I figured out the other day that the Right Approach was probably to warn only 
if there's an overridden can/isa that Broken Code doesn't call.  I'm going to 
make that the default behavior of UNIVERSAL::can and UNIVERSAL::isa very 
shortly, perhaps even this afternoon.

Then maybe hordes of CPAN developers will fix their bugs instead of blaming me 
for trying to help people test their code.

-- c

More information about the mailing list