From: Jesse Luehrs Date: Sat, 1 Aug 2009 18:16:23 +0000 (-0500) Subject: encourage using () for anon subtypes in attribute declarations X-Git-Tag: 0.89~22 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=940ed284e760a0f94305e9f2a4e945bc3d4349bd;p=gitmo%2FMoose.git encourage using () for anon subtypes in attribute declarations since has foo => (isa => subtype 'Int', where { $_ > 0 }, is => 'ro'); doesn't really work as might be expected --- diff --git a/lib/Moose/Manual/Types.pod b/lib/Moose/Manual/Types.pod index 2b3a575..391083c 100644 --- a/lib/Moose/Manual/Types.pod +++ b/lib/Moose/Manual/Types.pod @@ -364,7 +364,7 @@ type, or as the value for an attribute's C option: has 'size' => ( is => 'ro', - isa => subtype 'Int' => where { $_ > 0 }, + isa => subtype('Int' => where { $_ > 0 }), ); This is handy when you want to create a one-off type and don't want to