From: John Napiorkowski Date: Wed, 23 Jun 2010 23:51:48 +0000 (-0400) Subject: more minor formating code changes X-Git-Tag: 0.02~9 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1a6ad4bd25e1d53f22666fbca664568cbd8bf36f;hp=6c0e3459abf23be46753e90396936be6d748adc9;p=gitmo%2FMooseX-Dependent.git more minor formating code changes --- diff --git a/lib/MooseX/Meta/TypeCoercion/Parameterizable.pm b/lib/MooseX/Meta/TypeCoercion/Parameterizable.pm index 6a07ac6..6960092 100644 --- a/lib/MooseX/Meta/TypeCoercion/Parameterizable.pm +++ b/lib/MooseX/Meta/TypeCoercion/Parameterizable.pm @@ -39,6 +39,7 @@ around 'add_type_coercions' => sub { ## 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; @@ -51,7 +52,10 @@ sub compile_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; diff --git a/lib/MooseX/Meta/TypeConstraint/Parameterizable.pm b/lib/MooseX/Meta/TypeConstraint/Parameterizable.pm index 3afb43d..4a3ef27 100644 --- a/lib/MooseX/Meta/TypeConstraint/Parameterizable.pm +++ b/lib/MooseX/Meta/TypeConstraint/Parameterizable.pm @@ -76,15 +76,15 @@ has 'constraining_value' => ( 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); @@ -396,6 +396,5 @@ it under the same terms as Perl itself. =cut -1; -##__PACKAGE__->meta->make_immutable(inline_constructor => 0); +__PACKAGE__->meta->make_immutable(inline_constructor => 0);