From: Shawn M Moore Date: Sun, 23 Aug 2009 22:43:51 +0000 (-0400) Subject: A bunch of Native doc cleanups X-Git-Tag: 0.89_01~5^2~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9958cbe1b4315421ae21a7b8e23689f5d167ae21;p=gitmo%2FMoose.git A bunch of Native doc cleanups --- diff --git a/lib/Moose/Meta/Attribute/Native.pm b/lib/Moose/Meta/Attribute/Native.pm index 105616f..aef1486 100644 --- a/lib/Moose/Meta/Attribute/Native.pm +++ b/lib/Moose/Meta/Attribute/Native.pm @@ -73,11 +73,11 @@ Moose::Meta::Attribute::Native - Extend your attribute interfaces =head1 DESCRIPTION -While L attributes provide you with a way to name your accessors, -readers, writers, clearers and predicates, this library provides commonly +While L attributes provide a way to name your accessors, readers, +writers, clearers and predicates, this library provides commonly used attribute helper methods for more specific types of data. -As seen in the L, you specify the extension via the +As seen in the L, you specify the data structure via the C parameter. Available meta classes are below; see L. This module used to exist as the L extension. It was @@ -103,11 +103,11 @@ works normally for C<< handles >>. Common numerical operations. has 'integer' => ( - metaclass => 'Number', + traits => ['Number'], is => 'ro', isa => 'Int', default => 5, - handles => { + handles => { set => 'set', add => 'add', sub => 'sub', @@ -123,11 +123,11 @@ Common numerical operations. Common methods for string operations. has 'text' => ( - metaclass => 'String', + traits => ['String'], is => 'rw', isa => 'Str', default => q{}, - handles => { + handles => { add_text => 'append', replace_text => 'replace', } @@ -138,7 +138,7 @@ Common methods for string operations. Methods for incrementing and decrementing a counter attribute. has 'counter' => ( - traits => ['Counter'], + traits => ['Counter'], is => 'ro', isa => 'Num', default => 0, @@ -154,7 +154,7 @@ Methods for incrementing and decrementing a counter attribute. Common methods for boolean values. has 'is_lit' => ( - traits => ['Bool'], + traits => ['Bool'], is => 'rw', isa => 'Bool', default => 0, @@ -166,7 +166,6 @@ Common methods for boolean values. } ); - =item L Common methods for hash references. @@ -177,9 +176,9 @@ Common methods for hash references. isa => 'HashRef[Str]', default => sub { {} }, handles => { - set_option => 'set', - get_option => 'get', - has_option => 'exists', + set_option => 'set', + get_option => 'get', + has_option => 'exists', } ); @@ -192,8 +191,8 @@ Common methods for array references. is => 'ro', isa => 'ArrayRef[Str]', default => sub { [] }, - handles => { - add_item => 'push' + handles => { + add_item => 'push', next_item => 'shift', } );