From c4af522b7ac3cd0303643023b18eebb2c0ce2775 Mon Sep 17 00:00:00 2001 From: bustico Date: Wed, 27 Feb 2008 16:04:47 +0000 Subject: fix an error in validity callback checking only the pattern [callback, arg ...] was allowed, but another pattern is allowed : [obj, method, arg] --- Ivy.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Ivy.pm') diff --git a/Ivy.pm b/Ivy.pm index 60efc5c..854bffe 100644 --- a/Ivy.pm +++ b/Ivy.pm @@ -886,7 +886,7 @@ sub bindRegexp ($$$;$$) carp ("Warning binRegexp on $regexp :\nargument 3 (callback) is not correct and will be ignored\n"); return (); } - if (ref ($cb->[0]) ne 'CODE') { + if ((ref ($cb->[0]) ne 'CODE') && (ref ($cb->[1]) ne 'CODE')) { carp ("Warning binRegexp on $regexp :\nargument 3 (callback) is not correct and will be ignored\n"); return (); } -- cgit v1.1