From: Florian Ragwitz Date: Sun, 6 Sep 2009 01:21:29 +0000 (+0200) Subject: Show working example code in the MooseX::Types example. X-Git-Tag: 0.89_02~35 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=32a1dc89aa0691a28ac39820648fc0d2960d6cd4;p=gitmo%2FMoose.git Show working example code in the MooseX::Types example. --- diff --git a/lib/Moose/Manual/MooseX.pod b/lib/Moose/Manual/MooseX.pod index 27e1999..cd8a7d9 100644 --- a/lib/Moose/Manual/MooseX.pod +++ b/lib/Moose/Manual/MooseX.pod @@ -191,10 +191,10 @@ also lets you predeclare type names and use them as barewords. use MooseX::Types -declare => ['PositiveInt']; use MooseX::Types::Moose 'Int'; - subtype PositiveInt - => as Int, - => where { $_ > 0 } - => message {"Int is not larger than 0"}; + subtype PositiveInt, + as Int, + where { $_ > 0 }, + message { "Int is not larger than 0" }; One nice feature is that those bareword names are actually namespaced in Moose's type registry, so multiple applications can use the same