Pure Perl _INSTANCE is accidentally overloaded with what should be the
routine for _REGEX. Patch attached, code snippet with comment "###
Should be _REGEX" below:-
=head2 _REGEX $value
The C<_REGEX> function is intended to be imported into your package,
and provides a convenient way to test for a regular expression.
Returns the value itself as a convenience, or C<undef> if the value
provided is not a regular expression.
=cut
eval <<'EOP' if not defined &_REGEX;
sub _INSTANCE ($$) { ### Should be _REGEX
(defined $_[0] and 'Regexp' eq ref($_[0])) ? $_[0] : undef;
}
EOP
Lyle
Subject: | Util.pm.patch |
--- Util.pm Tue Nov 11 05:47:32 2008
+++ Util.pm.new Fri Jan 30 03:58:06 2009
@@ -597,7 +597,7 @@
=cut
eval <<'EOP' if not defined &_REGEX;
-sub _INSTANCE ($$) {
+sub _REGEX ($$) {
(defined $_[0] and 'Regexp' eq ref($_[0])) ? $_[0] : undef;
}
EOP