From: Chris Prather Date: Mon, 24 Aug 2009 00:55:16 +0000 (-0400) Subject: merge in changes from dec X-Git-Tag: 0.89_01~5^2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8580644d89b1981b2eb4550b538b96ddfc36fab6;p=gitmo%2FMoose.git merge in changes from dec --- 8580644d89b1981b2eb4550b538b96ddfc36fab6 diff --cc lib/Moose/Manual/Delegation.pod index 518bb63,ee41c10..6caea77 --- a/lib/Moose/Manual/Delegation.pod +++ b/lib/Moose/Manual/Delegation.pod @@@ -113,16 -113,11 +113,16 @@@ similar By providing the C trait to the C parameter you signal to Moose that you would like to use the set of Array helpers. Moose will then - create C and C methods that "just work". Behind the -create an C and a C method that "just works". Behind -the scenes C is something like ++create C and C method that "just works". Behind the +scenes C is something like - sub add_item { + sub add_item { my ($self, @items) = @_; + + for my $item (@items) { + $Item_TC->validate($item); + } + push @{ $self->queue }, @items; } @@@ -140,16 -135,15 +140,15 @@@ curry methods when creating delegates use Moose; has request => ( - is => 'ro' - isa => 'HTTP::Request', + is => 'ro' + isa => 'HTTP::Request', handles => { - set_user_agent => [ header => 'UserAgent'], - } + set_user_agent => [ header => 'UserAgent' ], + }, ) - With this definition calling C<< $spider->set_user_agent('MyClient') >> will - behind the scenes call - C<< $spider->request->header('UserAgent', 'MyClient') >>. -With this definition, calling C<$spider->set_user_agent('MyClient')> will -behind the scenes call C<$spider->request->header('UserAgent', 'MyClient')>. ++With this definition, calling C<< $spider->set_user_agent('MyClient') >> will ++behind the scenes call C<< $spider->request->header('UserAgent', 'MyClient')>>. =head1 MISSING ATTRIBUTES