switching over to dzil
[gitmo/MooseX-Types.git] / lib / MooseX / Types / Util.pm
index 10e3a38..1b3c979 100644 (file)
@@ -1,13 +1,10 @@
 package MooseX::Types::Util;
 
-=head1 NAME
-
-MooseX::Types::Util - Common utility functions for the module
-
-=cut
+#ABSTRACT: Common utility functions for the distribution
 
 use warnings;
 use strict;
+use Scalar::Util 'blessed';
 
 use base 'Exporter';
 
@@ -88,7 +85,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,11 +94,6 @@ sub has_available_type_export {
 
 L<MooseX::Types::Moose>, L<Exporter>
 
-=head1 AUTHOR AND COPYRIGHT
-
-Robert 'phaylon' Sedlacek C<E<lt>rs@474.atE<gt>>, with many thanks to
-the C<#moose> cabal on C<irc.perl.org>.
-
 =head1 LICENSE
 
 This program is free software; you can redistribute it and/or modify