NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Params::Util and UNIVERSAL::can (Score:1)
Params::Util::_INSTANCE has long done Scalar::Util::blessed($foo) and $foo->isa('bar'), I'd be interested to see how much overhead the extra function call adds.
Also, try substituting UNIVERSAL::can($foo, 'can') for blessed($foo)
Reply to This
Re: (Score:1)
Re: (Score:2)
So you want a fully qualified call to blessed instead of my importing it? Or did you miss that I had called blessed? UNIVERSAL::can('isa') is interestesting, but I'm sure that won't be much faster. I've added both of those (the fully qualified Scalar::Util::blessed() is called 'fqblessed', of course).
Re: (Score:1)