# Codulate to encapsulated action coderef
'&{}' => sub { shift->{code} },
+ # Make general $stuff still work
+ fallback => 1,
+
);
=head1 NAME
=head1 METHODS
-=over 4
-
-=item attributes
+=head2 attributes
-=item class
+=head2 class
-=item code
+=head2 code
-=item execute
+=head2 execute
=cut
sub execute { # Execute ourselves against a context
my ( $self, $c ) = @_;
+ local $c->namespace = $self->namespace;
return $c->execute( $self->class, $self );
}
-=item namespace
+=head2 match
+
+=cut
+
+sub match {
+ my ( $self, $c ) = @_;
+ return 1 unless exists $self->attributes->{Args};
+ return scalar(@{$c->req->args}) == $self->attributes->{Args}[0];
+}
-=item reverse
+=head2 namespace
-=item name
+=head2 reverse
-=back
+=head2 name
=head1 AUTHOR