@$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;
}
@$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;
}