Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Contents of @_ using subroutine signatures with default values

by perlfan (Vicar)
on Jul 14, 2020 at 00:54 UTC ( [id://11119278]=note: print w/replies, xml ) Need Help??


in reply to Re: Contents of @_ using subroutine signatures with default values
in thread Contents of @_ using subroutine signatures with default values

> @_ probably wont be populated

I think it is important to note that shift is also destructive, so using that as the idiomatic control of the experimental feature shows that processing it the accepted way more often than not also results in @_ not being populated.

This doesn't apply to another idiom (that I even use some times) that are non-destructive - like, my %opts = @_ - assuming params are passed in like foo(param1 => 2, param2 => 'foo').

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11119278]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2024-04-16 09:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found