Add a nice loud warning for idiots like me who type the wrong thing all the time
[gitmo/MooseX-Types-Common.git] / lib / MooseX / Types / Common.pm
index 63b206f..49341bd 100644 (file)
@@ -2,9 +2,18 @@ package MooseX::Types::Common;
 
 use strict;
 use warnings;
+use Carp qw/cluck/;
 
 our $VERSION = '0.001001';
 
+sub import {
+    my $package = shift;
+    return unless @_;
+    cluck("Tried to import the symbols " . join(', ', @_)
+        . " from MooseX::Types::Common.\nDid you mean "
+        . "MooseX::Types::Common::String or MooseX::Type::Common::Numeric?");
+}
+
 1;
 
 =head1 NAME