}
else{
$self->{_compiled_type_coercion} = sub {
- my($thing) = @_;\r
- foreach my $pair (@{$coercions}) {\r
- #my ($constraint, $converter) = @$pair;\r
- if ($pair->[0]->check($thing)) {\r
+ my($thing) = @_;
+ foreach my $pair (@{$coercions}) {
+ #my ($constraint, $converter) = @$pair;
+ if ($pair->[0]->check($thing)) {
local $_ = $thing;
return $pair->[1]->($thing);
- }\r
- }\r
- return $thing;\r
+ }
+ }
+ return $thing;
};
}
return;
=item *
-L<Moose::Cookbook::Basics::Recipe2> - A simple B<BankAccount> example\r
+L<Moose::Cookbook::Basics::Recipe2> - A simple B<BankAccount> example
=item *
=item *
-L<Moose::Cookbook::Basics::Recipe5> - More subtypes, coercion in a B<Request> class\r
+L<Moose::Cookbook::Basics::Recipe5> - More subtypes, coercion in a B<Request> class
=item *
-L<Moose::Cookbook::Basics::Recipe6> - The augment/inner example\r
+L<Moose::Cookbook::Basics::Recipe6> - The augment/inner example
=item *
-L<Moose::Cookbook::Basics::Recipe7> - Making Moose fast with immutable\r
+L<Moose::Cookbook::Basics::Recipe7> - Making Moose fast with immutable
=item *
-L<Moose::Cookbook::Basics::Recipe8> - Builder methods and lazy_build\r
+L<Moose::Cookbook::Basics::Recipe8> - Builder methods and lazy_build
=item *
-L<Moose::Cookbook::Basics::Recipe9> - Operator overloading, subtypes, and coercion\r
+L<Moose::Cookbook::Basics::Recipe9> - Operator overloading, subtypes, and coercion
=item *
-L<Moose::Cookbook::Basics::Recipe10> - Using BUILDARGS and BUILD to hook into object construction\r
+L<Moose::Cookbook::Basics::Recipe10> - Using BUILDARGS and BUILD to hook into object construction
=item *
-L<Moose::Cookbook::Roles::Recipe1> - The Moose::Role example\r
+L<Moose::Cookbook::Roles::Recipe1> - The Moose::Role example
=item *
=item *
-L<Moose::Cookbook::Roles::Recipe3> - Applying a role to an object instance\r
+L<Moose::Cookbook::Roles::Recipe3> - Applying a role to an object instance
=item *
-L<Moose::Cookbook::Meta::Recipe2> - A meta-attribute, attributes with labels\r
+L<Moose::Cookbook::Meta::Recipe2> - A meta-attribute, attributes with labels
=item *
-L<Moose::Cookbook::Meta::Recipe3> - Labels implemented via attribute traits\r
+L<Moose::Cookbook::Meta::Recipe3> - Labels implemented via attribute traits
=item *
-L<Moose::Cookbook::Extending::Recipe3> - Providing an alternate base object class\r
+L<Moose::Cookbook::Extending::Recipe3> - Providing an alternate base object class
=back
return $attr;
};
- around 'canonicalize_args' => sub {\r
- my ($next, $self, $name, %args) = @_;\r
-\r
- %args = $next->($self, $name, %args);\r
- $args{is} = 'rw' unless exists $args{is};\r
-\r
- return %args;\r
- };\r
+ around 'canonicalize_args' => sub {
+ my ($next, $self, $name, %args) = @_;
+
+ %args = $next->($self, $name, %args);
+ $args{is} = 'rw' unless exists $args{is};
+
+ return %args;
+ };
package # hide me from search.cpan.org
Mouse::Meta::Attribute::Custom::Number;