use Moose::Meta::Attribute;
use Moose::Util::TypeConstraints ();
-our $VERSION = '0.05';
+our $VERSION = '0.06';
our $AUTHORITY = 'cpan:STEVAN';
__PACKAGE__->meta->add_attribute('type_coercion_map' => (
my $thing = shift;
foreach my $coercion (@coercions) {
my ($constraint, $converter) = @$coercion;
- if (defined $constraint->($thing)) {
+ if ($constraint->($thing)) {
local $_ = $thing;
return $converter->($thing);
}
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
-=cut
\ No newline at end of file
+=cut