Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: new() function: incorrect?

by jeffa (Bishop)
on Nov 12, 2008 at 19:05 UTC ( #723260=note: print w/ replies, xml ) Need Help??


in reply to Re: new() function: incorrect?
in thread new() function: incorrect?

"Did you ask them why they thought it was wrong?"

Were I the interviewer I would most certainly raise a flag on this line:

my $class = ref($proto) || $proto;
This line is a classic "cargo cult" line that I myself used without knowing what it did or why it was there. The bottom line is that 9 times out of 10 this line will do what you want, but it is still cargo cult. I would have certainly preferred to see use Moose! :)


jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)


Comment on Re^2: new() function: incorrect?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2015-07-07 06:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (87 votes), past polls