$args{name} = $name;
- my $instance = bless \%args, $class;
+ my $self = bless \%args, $class;
# extra attributes
if($class ne __PACKAGE__){
- $class->meta->_initialize_instance($instance,\%args);
+ $class->meta->_initialize_object($self, \%args);
}
# XXX: there is no fast way to check attribute validity
# Carp::cluck("Found unknown argument(s) passed to '$name' attribute constructor in '$class': @bad");
# }
- return $instance
+ return $self;
}
# readers
sub coerce_constraint { ## my($self, $value) = @_;
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]);
}