## These two are here until I can merge change upstream to Moose. These are two
## very minor changes we can probably just put into Moose without breaking stuff
+
sub coerce {
my $self = shift @_;
my $coderef = $self->_compiled_type_coercion;
my @coercions;
while (@coercion_map) {
my ($constraint_name, $action) = splice(@coercion_map, 0, 2);
- my $type_constraint = ref $constraint_name ? $constraint_name : Moose::Util::TypeConstraints::find_or_parse_type_constraint($constraint_name);
+
+ my $type_constraint = ref $constraint_name
+ ? $constraint_name
+ : Moose::Util::TypeConstraints::find_or_parse_type_constraint($constraint_name);
unless ( defined $type_constraint ) {
require Moose;
This class defines the following methods.
-=head2 BUILD
+=head2 new
Do some post build stuff
=cut
## Right now I add in the parameterizable type coercion until I can merge some Moose
-## changes upstream. TODO change to BUILD or something
-
+## changes upstream.
+
around 'new' => sub {
my ($new, $class, @args) = @_;
my $self = $class->$new(@args);
=cut
-1;
-##__PACKAGE__->meta->make_immutable(inline_constructor => 0);
+__PACKAGE__->meta->make_immutable(inline_constructor => 0);