Skip Menu |

This queue is for tickets about the Params-Util CPAN distribution.

Report information
The Basics
Id: 22711
Status: resolved
Priority: 0/
Queue: Params-Util

People
Owner: Nobody in particular
Requestors: ebhanssen [...] allverden.no
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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
Fixed earlier