X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FTypes%2FCombine.pm;h=f41fd6ecdebcd8ed61adfd5a1356435ecae59169;hb=10390913a3dce9f3c43d7797a41b2384634bc9a1;hp=b44a4c8663e70b318891ea2d4f359472b4433964;hpb=12a9b8fe4f08bc0a7785831c34a27bb45f5bb8fb;p=gitmo%2FMooseX-Types.git diff --git a/lib/MooseX/Types/Combine.pm b/lib/MooseX/Types/Combine.pm index b44a4c8..f41fd6e 100644 --- a/lib/MooseX/Types/Combine.pm +++ b/lib/MooseX/Types/Combine.pm @@ -5,7 +5,7 @@ MooseX::Types::Combine - Combine type libraries for exporting =cut package MooseX::Types::Combine; -our $VERSION = "0.20"; +our $VERSION = "0.24"; use strict; use warnings; @@ -45,7 +45,14 @@ sub import { } @type_libs; my %from; - push @{ $from{ $types{ $_ } } }, $_ for @types; + for my $type (@types) { + die + "$caller asked for a type ($type) which is not found in any of the" + . " type libraries (@type_libs) combined by $class\n" + unless $types{$type}; + + push @{ $from{ $types{$type} } }, $type; + } $_->import({ -into => $caller }, @{ $from{ $_ } }) for keys %from;