Skip to content

Commit

Permalink
mention attribute accessor chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Aug 29, 2012
1 parent a0f8437 commit b7b68d5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/Mojo/Base.pm
Expand Up @@ -209,10 +209,12 @@ pass it either a hash or a hash reference with attribute values.
BaseSubClass->attr([qw(name1 name2 name3)] => 'foo');
BaseSubClass->attr([qw(name1 name2 name3)] => sub {...});
Create attributes for hash-based objects. An array reference can be used to
create more than one attribute. Pass an optional second argument to set a
default value, it should be a constant or a callback. The callback will be
excuted at accessor read time if there's no set value.
Create attribute accessor for hash-based objects. An array reference can be
used to create more than one attribute. Pass an optional second argument to
set a default value, it should be a constant or a callback. The callback will
be excuted at accessor read time if there's no set value. Accessors can be
chained, that means they return their invocant when they are called with an
argument.
=head2 C<tap>
Expand Down

0 comments on commit b7b68d5

Please sign in to comment.