X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-Types.git;a=blobdiff_plain;f=lib%2FMooseX%2FTypes%2FCombine.pm;h=1e33a08c54772e54af04a334bbeb0f4f09cd6c8a;hp=b44a4c8663e70b318891ea2d4f359472b4433964;hb=bd47cf6420c3cc9b129164d6d0fcb7985a951ae1;hpb=12a9b8fe4f08bc0a7785831c34a27bb45f5bb8fb diff --git a/lib/MooseX/Types/Combine.pm b/lib/MooseX/Types/Combine.pm index b44a4c8..1e33a08 100644 --- a/lib/MooseX/Types/Combine.pm +++ b/lib/MooseX/Types/Combine.pm @@ -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;