X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-Types-Structured.git;a=blobdiff_plain;f=lib%2FMooseX%2FTypes%2FStructured.pm;h=e336cd3aa7f0e2d3a164ff80bc4a0c89f9fbbfba;hp=b0ee907d2585631de4591eee6c3bcc38eb0c2a8d;hb=aa4718fef8106533dcfb8cf141091e824f4896b1;hpb=2f8e2a40df28278fcd9a1d2c0a6535f09cabd211 diff --git a/lib/MooseX/Types/Structured.pm b/lib/MooseX/Types/Structured.pm index b0ee907..e336cd3 100644 --- a/lib/MooseX/Types/Structured.pm +++ b/lib/MooseX/Types/Structured.pm @@ -659,7 +659,7 @@ Moose::Util::TypeConstraints::get_type_constraint_registry->add_type_constraint( @$type_constraints : (); my $overflow_handler; - if(blessed $type_constraints[-1] + if($type_constraints[-1] && blessed $type_constraints[-1] && $type_constraints[-1]->isa('MooseX::Types::Structured::OverflowHandler')) { $overflow_handler = pop @type_constraints; } @@ -716,7 +716,7 @@ Moose::Util::TypeConstraints::get_type_constraint_registry->add_type_constraint( @$type_constraints : (); my $overflow_handler; - if(blessed $type_constraints[-1] + if($type_constraints[-1] && blessed $type_constraints[-1] && $type_constraints[-1]->isa('MooseX::Types::Structured::OverflowHandler')) { $overflow_handler = pop @type_constraints; }