Skip to content

Instantly share code, notes, and snippets.

@tadzik
Created August 2, 2011 00:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tadzik/1119304 to your computer and use it in GitHub Desktop.
Save tadzik/1119304 to your computer and use it in GitHub Desktop.
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