P is for Practical | |
PerlMonks |
Re: Shift versus Sanityby rinceWind (Monsignor) |
on Apr 24, 2002 at 10:05 UTC ( [id://161556]=note: print w/replies, xml ) | Need Help?? |
These days, I tend to use @_ exclusively. However, there's one circumstance when shift wins: optional arguments. How about the classic get-and-set method for an accessor method of a scalar data item: However, as a general rule for optional arguments, I tend to use a named parameter scheme, passing in key=>value pairs cast internally to a hash.
In Section
Meditations
|
|