my $tc = Type::Registry->new->foreign_lookup($name);
return defined $tc ? $tc : die "'$name' not a full namespace type constraint in ${\$self->private_path}";
}
-
+
my @tc = grep { defined $_ } (eval("package ${\$self->class}; $name"));
unless(scalar @tc) {
} else {
return;
}
- }
+ }
}
}
-
+
my $classes = join(',', $self->class, @roles, @supers);
die "'$name' not a type constraint in '${\$self->private_path}', Looked in: $classes";
}
return $a1->comparable_arg_number <=> $a2->comparable_arg_number;
}
+sub equals {
+ my ($self, $target) = @_;
+ return $self->private_path eq $target->private_path ? $self : 0;
+}
+
sub scheme {
return exists $_[0]->attributes->{Scheme} ? $_[0]->attributes->{Scheme}[0] : undef;
}
Args => $self->normalized_arg_number,
CaptureArgs => $self->number_of_captures,
}
-}
+}
__PACKAGE__->meta->make_immutable;
Compares 2 actions based on the value of the C<Args> attribute, with no C<Args>
having the highest precedence.
+=head2 equal
+
+ if( $action->equal($other_action) ) { ... }
+
+Returns true if the two actions are equal.
+
=head2 namespace
Returns the private namespace this action lives in.