bump up Moose dep (RT#53016), release
[gitmo/MooseX-Types.git] / lib / MooseX / Types / Combine.pm
index b44a4c8..1ee476c 100644 (file)
@@ -5,7 +5,7 @@ MooseX::Types::Combine - Combine type libraries for exporting
 =cut
 
 package MooseX::Types::Combine;
-our $VERSION = "0.20";
+our $VERSION = "0.21";
 
 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;