X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FTypes%2FUtil.pm;h=fc6488fd93c4ccfe480059a8e3244ccb2cbdd2d4;hb=e512ffb3d659afc40efa844af865a3cee211a031;hp=10e3a388ed60d82b357e65408e95e61a686ee2f6;hpb=5885c4f4e1f234e7521f952bd1c1956395494c1e;p=gitmo%2FMooseX-Types.git diff --git a/lib/MooseX/Types/Util.pm b/lib/MooseX/Types/Util.pm index 10e3a38..fc6488f 100644 --- a/lib/MooseX/Types/Util.pm +++ b/lib/MooseX/Types/Util.pm @@ -1,4 +1,5 @@ package MooseX::Types::Util; +our $VERSION = "0.25"; =head1 NAME @@ -8,6 +9,7 @@ MooseX::Types::Util - Common utility functions for the module use warnings; use strict; +use Scalar::Util 'blessed'; use base 'Exporter'; @@ -88,7 +90,7 @@ sub has_available_type_export { or return undef; return undef - unless $sub->isa('MooseX::Types::EXPORTED_TYPE_CONSTRAINT'); + unless blessed $sub && $sub->isa('MooseX::Types::EXPORTED_TYPE_CONSTRAINT'); return $sub->(); } @@ -97,10 +99,9 @@ sub has_available_type_export { L, L -=head1 AUTHOR AND COPYRIGHT +=head1 AUTHOR -Robert 'phaylon' Sedlacek Crs@474.atE>, with many thanks to -the C<#moose> cabal on C. +See L. =head1 LICENSE