From: Shawn M Moore <sartak@gmail.com> Date: Sun, 7 Dec 2008 03:10:08 +0000 (+0000) Subject: Doc tweaks to reflect that keywords can be used outside of role {} X-Git-Tag: 0.05~40 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c190fb29393d3ba7a7e37d138e5bd84197744a13;p=gitmo%2FMooseX-Role-Parameterized.git Doc tweaks to reflect that keywords can be used outside of role {} --- diff --git a/lib/MooseX/Role/Parameterized.pm b/lib/MooseX/Role/Parameterized.pm index 00d4af9..ae24e21 100644 --- a/lib/MooseX/Role/Parameterized.pm +++ b/lib/MooseX/Role/Parameterized.pm @@ -253,12 +253,6 @@ You must use this syntax to declare methods in the role block: C<< method NAME => sub { ... }; >>. This is due to a limitation in Perl. In return though you can use parameters I<in your methods>! -You must use all the keywords in the role block. If it turns out to be correct, -we'll compose the parameterizable role (everything outside the role block) with -the parameterized role (everything inside the role block). We throw an error if -you try to use a keyword outside of the role block, so don't worry about it for -now. - L<Moose::Role/alias> and L<Moose::Role/excludes> are not yet supported. I'm completely unsure of whether they should be handled by this module. Until we figure out a plan, both declaring and providing a parameter named C<alias> or diff --git a/lib/MooseX/Role/Parameterized/Tutorial.pm b/lib/MooseX/Role/Parameterized/Tutorial.pm index af18902..ab7c921 100644 --- a/lib/MooseX/Role/Parameterized/Tutorial.pm +++ b/lib/MooseX/Role/Parameterized/Tutorial.pm @@ -60,9 +60,9 @@ then passed to... =head3 C<role> C<role> takes a block of code that will be used to generate your role with its -parameters bound. Here is where you put your regular role code: use C<has>, -method modifiers, and so on. You receive as an argument the parameter object -constructed by C<with>. You can access the parameters just like regular +parameters bound. Here is where you declare parameterized components: use +C<has>, method modifiers, and so on. You receive as an argument the parameter +object constructed by C<with>. You can access the parameters just like regular attributes on that object (assuming you declared them readable). Each time you compose this parameterized role, the role {} block will be