package MooseX::AttributeHelpers::Counter;
use Moose;
+use Moose::Util::TypeConstraints;
our $VERSION = '0.01';
our $AUTHORITY = 'cpan:STEVAN';
(exists $options->{isa})
|| confess "You must define a type with the Counter metaclass";
- (find_type_constraint($options->{isa})->is_subtype_of('Num'))
- || confess "The type constraint for a Counter must be a subtype of Num";
+ (find_type_constraint($options->{isa})->is_a_type_of('Num'))
+ || confess "The type constraint for a Counter ($options->{isa}) must be a subtype of Num";
}
no Moose;
+no Moose::Util::TypeConstraints;
# register the alias ...
package Moose::Meta::Attribute::Custom::Counter;