summaryrefslogtreecommitdiff
path: root/Ivy.pm
diff options
context:
space:
mode:
authorbustico2008-02-27 16:04:47 +0000
committerbustico2008-02-27 16:04:47 +0000
commitc4af522b7ac3cd0303643023b18eebb2c0ce2775 (patch)
treebc3429f99fe86121d11b54ff9c0fede571743aa6 /Ivy.pm
parentc1ac8c7cf2130c3a8e8899f766c6af35205afce1 (diff)
downloadivy-perl-c4af522b7ac3cd0303643023b18eebb2c0ce2775.zip
ivy-perl-c4af522b7ac3cd0303643023b18eebb2c0ce2775.tar.gz
ivy-perl-c4af522b7ac3cd0303643023b18eebb2c0ce2775.tar.bz2
ivy-perl-c4af522b7ac3cd0303643023b18eebb2c0ce2775.tar.xz
fix an error in validity callback checking
only the pattern [callback, arg ...] was allowed, but another pattern is allowed : [obj, method, arg]
Diffstat (limited to 'Ivy.pm')
-rw-r--r--Ivy.pm2
1 files changed, 1 insertions, 1 deletions
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 ();
}