From: Jesse Luehrs Date: Fri, 11 Sep 2009 03:48:39 +0000 (-0500) Subject: a bit more docs for code helpers X-Git-Tag: 0.90~59 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b86a4688111e7f7c0ddbc2195a9ce3c1ec877563;p=gitmo%2FMoose.git a bit more docs for code helpers --- diff --git a/lib/Moose/Meta/Attribute/Native.pm b/lib/Moose/Meta/Attribute/Native.pm index 4b4b833..95db4c8 100644 --- a/lib/Moose/Meta/Attribute/Native.pm +++ b/lib/Moose/Meta/Attribute/Native.pm @@ -198,6 +198,20 @@ Common methods for array references. } ); +=item L + +Common methods for code references. + + has 'callback' => ( + traits => ['Code'], + is => 'ro', + isa => 'CodeRef', + default => sub { sub { 'called' } }, + handles => { + call => 'execute', + } + ); + =back =head1 BUGS diff --git a/lib/Moose/Meta/Attribute/Native/Trait/Code.pm b/lib/Moose/Meta/Attribute/Native/Trait/Code.pm index 95b549a..4d8b9ed 100644 --- a/lib/Moose/Meta/Attribute/Native/Trait/Code.pm +++ b/lib/Moose/Meta/Attribute/Native/Trait/Code.pm @@ -61,6 +61,18 @@ Calls the coderef with the given args. =back +=head1 METHODS + +=over 4 + +=item B + +=item B + +=item B + +=back + =head1 BUGS All complex software has bugs lurking in it, and this module is no