Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: shift vs @_

by sgifford (Prior)
on Oct 02, 2006 at 20:29 UTC ( #575950=note: print w/ replies, xml ) Need Help??


in reply to Re^2: shift vs @_
in thread shift vs @_

Thanks jimt, I've updated that example to use:

my $self = ref $_[0] ? shift : undef;
which doesn't seem to suffer from the largest of the problems. I've also added some clarifications about when it will and won't work.

As an aside, you would have a very hard time convincing me that this behavior of my and conditionals is anything but a bug in Perl. :)


Comment on Re^3: shift vs @_
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2014-12-22 03:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (110 votes), past polls