Created
August 2, 2011 00:20
-
-
Save tadzik/1119304 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/core/Signature.pm b/src/core/Signature.pm | |
index d7f8fef..066a810 100644 | |
--- a/src/core/Signature.pm | |
+++ b/src/core/Signature.pm | |
@@ -6,6 +6,15 @@ my class Signature { | |
# has $!arity; # cached arity | |
# has $!count; # cached count | |
+ method ACCEPTS(Capture $c) { | |
+ my $result = Bool::False; | |
+ try { | |
+ self!BIND($c); | |
+ $result = Bool::True; | |
+ } | |
+ return $result | |
+ } | |
+ | |
method arity() { | |
self.count if nqp::isnull($!arity) || !$!arity.defined; | |
$!arity; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment