bump version and update changes for next release
[gitmo/Moose.git] / lib / Moose / Util / TypeConstraints.pm
index eb253d9..855bd00 100644 (file)
@@ -9,7 +9,7 @@ use List::MoreUtils qw( all );
 use Scalar::Util 'blessed';
 use Moose::Exporter;
 
-our $VERSION   = '0.65';
+our $VERSION   = '0.67';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
@@ -381,6 +381,10 @@ sub _create_type_constraint ($$$;$$) {
                 . " and cannot be created again in "
                 . $pkg_defined_in )
             if defined $type;
+
+        $name =~ /^[\w:\.]+$/
+            or die qq{$name contains invalid characters for a type name.}
+            . qq{Names can contain alphanumeric character, ":", and "."\n};
     }
 
     my %opts = (
@@ -439,7 +443,7 @@ sub _install_type_coercions ($$) {
 
     use re "eval";
 
-    my $valid_chars = qr{[\w:]};
+    my $valid_chars = qr{[\w:\.]};
     my $type_atom   = qr{ $valid_chars+ };
 
     my $any;
@@ -788,6 +792,9 @@ but it is a saner restriction than most others.
 
 =head2 Type Constraint Naming
 
+Type name declared via this module can only contain alphanumeric
+characters, colons (:), and periods (.).
+
 Since the types created by this module are global, it is suggested
 that you namespace your types just as you would namespace your
 modules. So instead of creating a I<Color> type for your B<My::Graphics>
@@ -1079,7 +1086,7 @@ Stevan Little E<lt>stevan@iinteractive.comE<gt>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2006-2008 by Infinity Interactive, Inc.
+Copyright 2006-2009 by Infinity Interactive, Inc.
 
 L<http://www.iinteractive.com>