Subject: | _CODELIKE(sub { }) eq 1 # and shouldn't be |
As of 0.21:
The POD for _CODELIKE says "Returns the callable value as a convenience,
or C<undef> if the value provided is not callable." But if the reftype
is 'CODE', it merely returns a simple scalar, 1.
Easily fixed though -- just another pair of parentheses:
sub _CODELIKE {
((Scalar::Util::reftype($_[0])||'') eq 'CODE'
or
Scalar::Util::blessed($_[0]) and overload::Method($_[0],'&{}')
) ? $_[0] : undef;
}
(Unless RT messes up the indentation, that should match what you have
for _INVOCANT.)
Eirik
--
Eirik Berg Hanssen, ebhanssen@allverden.no
Just this .sig then
nothing more