From: Shawn M Moore 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! -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 and L 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 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 C 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, -method modifiers, and so on. You receive as an argument the parameter object -constructed by C. You can access the parameters just like regular +parameters bound. Here is where you declare parameterized components: use +C, method modifiers, and so on. You receive as an argument the parameter +object constructed by C. 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