On 11/24/18 2:51 PM, Dan Book wrote:
The shift function removes and returns the first argument from @_ (since there's no array passed for it to shift from) in a sub. It's used this way because the first argument to these subs is the invocant/object. You can replace it with $_[0] to get the first argument without removing it. You should not use $self from outside unless necessary because that may create a circular reference and leak memory.
Thanks.  I totally missed that it was being used in a sub in those cases.

--
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to