Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: "if" Considered Harmful in OO programming

by jryan (Vicar)
on Sep 20, 2004 at 06:01 UTC ( #392294=note: print w/ replies, xml ) Need Help??


in reply to "if" Considered Harmful in OO programming

Just a nit:

unless (grep { $array_ref->[0] eq $_ } keys %token) {

is better as:

unless (exists $token{$array_ref->[0]}) {


Comment on Re: "if" Considered Harmful in OO programming
Select or Download Code
Re^2: "if" Considered Harmful in OO programming
by Ovid (Cardinal) on Sep 20, 2004 at 06:35 UTC

    That's far more than a nit. I'm not sure what I originally intended there but that's some bad code on my part. Maybe I was lower-casing the tag or there was an assignment to an array; I don't know. In any event, we have a curious example of code evolution because my test suite validated it. That's some interesting food for thought.

    Cheers,
    Ovid

    New address of my CGI Course.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2015-07-02 04:22 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 (27 votes), past polls