Bump version to 0.24
[gitmo/MooseX-Storage.git] / lib / MooseX / Storage / Engine.pm
index 95263f9..ce2cb74 100644 (file)
@@ -3,7 +3,7 @@ package MooseX::Storage::Engine;
 use Moose;
 use Scalar::Util qw(refaddr);
 
-our $VERSION   = '0.20';
+our $VERSION   = '0.24';
 our $AUTHORITY = 'cpan:STEVAN';
 
 # the class marker when
@@ -307,8 +307,8 @@ sub find_type_handler {
     # If both is true recurse this method
     # using ->type_parameter.
     return $self->find_type_handler($type_constraint->type_parameter)
-        if $type_constraint->parent eq 'Maybe'
-          and not $type_constraint->parent->can('type_parameter');
+        if ($type_constraint->parent && $type_constraint->parent eq 'Maybe'
+          and not $type_constraint->parent->can('type_parameter'));
 
     # this should handle most type usages
     # since they they are usually just
@@ -352,6 +352,8 @@ sub find_type_handler_for {
     $TYPES{$type_handler_name}
 }
 
+no Moose::Role;
+
 1;
 
 __END__