use Carp 'confess';
use Moose::Util::TypeConstraints;
-our $VERSION = '0.02';
+our $VERSION = '0.55';
our $AUTHORITY = 'cpan:STEVAN';
use base 'Moose::Meta::TypeConstraint';
predicate => 'has_type_parameter',
));
+sub equals {
+ my ( $self, $type_or_name ) = @_;
+
+ my $other = Moose::Util::TypeConstraints::find_type_constraint($type_or_name);
+
+ return unless $other->isa(__PACKAGE__);
+
+ return (
+ $self->type_parameter->equals( $other->type_parameter )
+ and
+ $self->parent->equals( $other->parent )
+ );
+}
+
sub compile_type_constraint {
my $self = shift;
=item B<meta>
+=item B<equals>
+
=back
=head1 BUGS