);
}
-sub coerce_constraint { # DEPRECATED
- my $type = $_[0]->{type_constraint}
- or return $_[1];
-
- Carp::cluck("coerce_constraint() has been deprecated, which was an internal utility anyway");
-
- return Mouse::Util::TypeConstraints->typecast_constraints($_[0]->associated_class->name, $type, $_[1]);
-}
-
sub clone_and_inherit_options{
my($self, %args) = @_;
my $check = delete $args{optimized};
- if($args{_compiled_type_constraint}){
- Carp::cluck("'_compiled_type_constraint' has been deprecated, use 'optimized' instead")
- if Mouse::Util::_MOUSE_VERBOSE;
-
- $check = $args{_compiled_type_constraint};
- }
-
if($check){
$args{hand_optimized_type_constraint} = $check;
$args{compiled_type_constraint} = $check;
);
}
-sub typecast_constraints { # DEPRECATED
- my($class, $pkg, $type, $value) = @_;
- Carp::croak("wrong arguments count") unless @_ == 4;
-
- Carp::cluck("typecast_constraints() has been deprecated, which was an internal utility anyway");
-
- return $type->coerce($value);
-}
-
sub enum {
my($name, %valid);