use Scalar::Util 'blessed';
-our $VERSION = '0.75';
-$VERSION = eval $VERSION;
-our $AUTHORITY = 'cpan:STEVAN';
-
use base 'Class::MOP::Object';
__PACKAGE__->meta->add_attribute('parent_registry' => (
reader => 'get_parent_registry',
- writer => 'set_parent_registry',
- predicate => 'has_parent_registry',
+ writer => 'set_parent_registry',
+ predicate => 'has_parent_registry',
+ Class::MOP::_definition_context(),
));
__PACKAGE__->meta->add_attribute('type_constraints' => (
reader => 'type_constraints',
- default => sub { {} }
+ default => sub { {} },
+ Class::MOP::_definition_context(),
));
-sub new {
+sub new {
my $class = shift;
my $self = $class->_new(@_);
return $self;
sub get_type_constraint {
my ($self, $type_name) = @_;
- return unless defined $type_name;
+ return unless defined $type_name;
$self->type_constraints->{$type_name}
}
1;
+# ABSTRACT: registry for type constraints
+
__END__
=pod
-=head1 NAME
-
-Moose::Meta::TypeConstraint::Registry - registry for type constraints
-
=head1 DESCRIPTION
This class is a registry that maps type constraint names to
=head1 BUGS
-All complex software has bugs lurking in it, and this module is no
-exception. If you find a bug please either email me, or add the bug
-to cpan-RT.
-
-=head1 AUTHOR
-
-Stevan Little E<lt>stevan@iinteractive.comE<gt>
-
-=head1 COPYRIGHT AND LICENSE
-
-Copyright 2006-2009 by Infinity Interactive, Inc.
-
-L<http://www.iinteractive.com>
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
+See L<Moose/BUGS> for details on reporting bugs.
=cut