![]() |
|
Keep It Simple, Stupid | |
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
Okay, since nobody else has said it yet, I will: I like
shift(). :)
Honestly, I'd never thought of it as possibly being obfuscated until I read this thread.
If I'm working in an OOP module I habitually use shift() to get the object then use @_ for the rest of the parameters, like:
In my mind it's a pretty clean separation of things. However, I suppose I'll admit that I have been bitten by this (as jeffa asked):
More than once. ;) Usually I get irritated, jump up, amble to the other side of my cubicle wall to interrupt the marketing-type guy (revenge for the 6-7 times he'll be at my desk), head back, look at the code, slap my forehead, fix it, and move on. In reply to Re: Shift versus Sanity
by mattriff
|
|