On Thu, May 31, 2012 at 20:36:50 -0400 , Shawn H Corey wrote:
> >>Should this be:
> >>     my %attrs = @_;
> >
> >As Mark seems to be using DBIx::Class, and the new method on ::ResultSet
> >classes is defined as taking \%attrs, probably not.
> >
> 
> my $attrs = @_;
> 
> This will store the number of elements in the array @_ into $attrs.
> Why do that when this is simpler:
> 
> $obj->insert_shift( scalar @array );

Probably because there's supposed to be () round the $attrs and we both
missed it. :)

-- 
Chris Nehren           | Coder, Sysadmin, Masochist
Shadowcat Systems Ltd. | http://shadowcat.co.uk/

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to