[Moose-commits] r7406 - in Moose/trunk: . lib/Moose/Util
autarch at code2.0beta.co.uk
autarch at code2.0beta.co.uk
Wed Jan 28 19:03:19 GMT 2009
Author: autarch
Date: 2009-01-28 11:03:18 -0800 (Wed, 28 Jan 2009)
New Revision: 7406
Modified:
Moose/trunk/Changes
Moose/trunk/lib/Moose/Util/TypeConstraints.pm
Log:
Add changes for MUC change.
Make sure MUC docs mention when it auto-vivifies a name as a class type.
Modified: Moose/trunk/Changes
===================================================================
--- Moose/trunk/Changes 2009-01-28 19:02:07 UTC (rev 7405)
+++ Moose/trunk/Changes 2009-01-28 19:03:18 UTC (rev 7406)
@@ -5,6 +5,12 @@
- Added a delegation_metaclass method to replace a hard-coded
use of Moose::Meta::Method::Delegation. (Dave Rolsky)
+ * Moose::Util::TypeConstraints
+ - If you created a subtype and passed a parent that Moose didn't
+ know about, it simply ignored the parent. Now it automatically
+ creates the parent as a class type. This may not be what you
+ want, but is less broken than before. (Dave Rolsky)
+
0.65 Thu, January 22, 2008
* Moose and Moose::Meta::Method::Overridden
- If an overridden method called super(), and then the
Modified: Moose/trunk/lib/Moose/Util/TypeConstraints.pm
===================================================================
--- Moose/trunk/lib/Moose/Util/TypeConstraints.pm 2009-01-28 19:02:07 UTC (rev 7405)
+++ Moose/trunk/lib/Moose/Util/TypeConstraints.pm 2009-01-28 19:03:18 UTC (rev 7406)
@@ -395,7 +395,7 @@
my $constraint;
if ( defined $parent
and $parent
- = blessed $parent ? $parent : find_or_parse_type_constraint($parent) )
+ = blessed $parent ? $parent : find_or_create_isa_type_constraint($parent) )
{
$constraint = $parent->create_child_type(%opts);
}
@@ -838,6 +838,9 @@
This creates a named subtype.
+If you provide a parent that Moose does not recognize, it will
+automatically create a new class type constraint for this name.
+
=item B<subtype ($parent, $where_clause, ?$message)>
This creates an unnamed subtype and will return the type
More information about the Moose-commits
mailing list