From: Shawn M Moore Date: Sun, 23 Aug 2009 22:48:43 +0000 (-0400) Subject: More cleanup in native documentation X-Git-Tag: 0.89_01~5^2~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9610c1d2be5ceb367ec30633643d6d9bce82bfe0;p=gitmo%2FMoose.git More cleanup in native documentation --- diff --git a/lib/Moose/Manual/Delegation.pod b/lib/Moose/Manual/Delegation.pod index fd155f1..518bb63 100644 --- a/lib/Moose/Manual/Delegation.pod +++ b/lib/Moose/Manual/Delegation.pod @@ -108,7 +108,7 @@ similar. handles => { add_item => 'push', next_item => 'shift', - } + }, ) By providing the C trait to the C parameter you signal to @@ -144,7 +144,7 @@ curry methods when creating delegates. isa => 'HTTP::Request', handles => { set_user_agent => [ header => 'UserAgent' ], - } + }, ) With this definition calling C<< $spider->set_user_agent('MyClient') >> will diff --git a/lib/Moose/Meta/Attribute/Native/Trait/Array.pm b/lib/Moose/Meta/Attribute/Native/Trait/Array.pm index 139fccf..3ec6889 100644 --- a/lib/Moose/Meta/Attribute/Native/Trait/Array.pm +++ b/lib/Moose/Meta/Attribute/Native/Trait/Array.pm @@ -41,17 +41,17 @@ Moose::Meta::Attribute::Native::Trait::Array is => 'ro', isa => 'ArrayRef[Str]', default => sub { [] }, - handles => { - all_options => 'elements', - map_options => 'map', - filter_options => 'grep', - find_option => 'first', - get_option => 'get', - join_options => 'join', - count_options => 'count', - has_no_options => 'is_empty', - sorted_options => 'sort', - } + handles => { + all_options => 'elements', + map_options => 'map', + filter_options => 'grep', + find_option => 'first', + get_option => 'get', + join_options => 'join', + count_options => 'count', + has_no_options => 'is_empty', + sorted_options => 'sort', + }, ); no Moose; diff --git a/lib/Moose/Meta/Attribute/Native/Trait/Bool.pm b/lib/Moose/Meta/Attribute/Native/Trait/Bool.pm index d5e4dd0..07ea10a 100644 --- a/lib/Moose/Meta/Attribute/Native/Trait/Bool.pm +++ b/lib/Moose/Meta/Attribute/Native/Trait/Bool.pm @@ -37,7 +37,7 @@ Moose::Meta::Attribute::Native::Trait::Bool use Moose; has 'is_lit' => ( - traits => ['Bool'], + traits => ['Bool'], is => 'rw', isa => 'Bool', default => 0, @@ -46,7 +46,7 @@ Moose::Meta::Attribute::Native::Trait::Bool darken => 'unset', flip_switch => 'toggle', is_dark => 'not', - } + }, ); my $room = Room->new(); diff --git a/lib/Moose/Meta/Attribute/Native/Trait/Counter.pm b/lib/Moose/Meta/Attribute/Native/Trait/Counter.pm index a1a9751..54a0adf 100644 --- a/lib/Moose/Meta/Attribute/Native/Trait/Counter.pm +++ b/lib/Moose/Meta/Attribute/Native/Trait/Counter.pm @@ -55,7 +55,7 @@ Moose::Meta::Attribute::Native::Trait::Counter use Moose; has 'counter' => ( - traits => ['Counter'], + traits => ['Counter'], is => 'ro', isa => 'Num', default => 0, @@ -63,7 +63,7 @@ Moose::Meta::Attribute::Native::Trait::Counter inc_counter => 'inc', dec_counter => 'dec', reset_counter => 'reset', - } + }, ); my $page = MyHomePage->new(); diff --git a/lib/Moose/Meta/Attribute/Native/Trait/Hash.pm b/lib/Moose/Meta/Attribute/Native/Trait/Hash.pm index c23041d..6ff714a 100644 --- a/lib/Moose/Meta/Attribute/Native/Trait/Hash.pm +++ b/lib/Moose/Meta/Attribute/Native/Trait/Hash.pm @@ -48,7 +48,7 @@ Moose::Meta::Attribute::Native::Trait::Hash num_options => 'count', delete_option => 'delete', pairs => 'kv', - } + }, ); =head1 DESCRIPTION diff --git a/lib/Moose/Meta/Attribute/Native/Trait/Number.pm b/lib/Moose/Meta/Attribute/Native/Trait/Number.pm index 8ae4a34..f56c824 100644 --- a/lib/Moose/Meta/Attribute/Native/Trait/Number.pm +++ b/lib/Moose/Meta/Attribute/Native/Trait/Number.pm @@ -70,7 +70,7 @@ Moose::Meta::Attribute::Native::Trait::Number is => 'ro', isa => 'Int', default => 5, - handles => { + handles => { set => 'set', add => 'add', sub => 'sub', @@ -78,7 +78,7 @@ Moose::Meta::Attribute::Native::Trait::Number div => 'div', mod => 'mod', abs => 'abs', - } + }, ); my $real = Real->new(); diff --git a/lib/Moose/Meta/Attribute/Native/Trait/String.pm b/lib/Moose/Meta/Attribute/Native/Trait/String.pm index 1566644..861b5c7 100644 --- a/lib/Moose/Meta/Attribute/Native/Trait/String.pm +++ b/lib/Moose/Meta/Attribute/Native/Trait/String.pm @@ -52,14 +52,14 @@ Moose::Meta::Attribute::Native::Trait::String use Moose; has 'text' => ( - metaclass => 'String', + traits => ['String'], is => 'rw', isa => 'Str', default => q{}, - handles => { + handles => { add_text => 'append', replace_text => 'replace', - } + }, ); my $page = MyHomePage->new();