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);
}
=head1 COPYRIGHT AND LICENSE
-Copyright 2006, 2007 by Infinity Interactive, Inc.
+Copyright 2006-2008 by Infinity Interactive, Inc.
L<http://www.iinteractive.com>
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