Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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

by perlfan (Vicar)
on Jul 14, 2020 at 00:54 UTC ( #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? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2021-10-22 07:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (85 votes). Check out past polls.

    Notices?