Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^4: Two simple code style advice questions

by Anonymous Monk
on Jan 16, 2013 at 14:20 UTC ( #1013580=note: print w/replies, xml ) Need Help??


in reply to Re^3: Two simple code style advice questions
in thread Two simple code style advice questions

Now what do you mean by that? What is it that you expect and how is it unsafe?
  • Comment on Re^4: Two simple code style advice questions

Replies are listed 'Best First'.
Re^5: Two simple code style advice questions
by Anonymous Monk on Jan 16, 2013 at 14:37 UTC

    The issue is that the code relies on true being represented by numeric one. While that works for numeric comparisons, it is not a safe assumption in general. So applying this construct to other kinds of tests could be dangerous.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1013580]
help
Chatterbox?
[stevieb]: I don't even own a Windows computer. Both my girl and I have a laptop each with Linux. I'm supporting Windows in some of my projects and I can't even guage whether it's worth it or not.
[stevieb]: shmem It's something I desired to have years ago, which is why I took over berrybrew. Cross-platform build/test automation locally, or over the network Test::BrewBuild
[shmem]: sounds good.
[shmem]: but I'm crumbling smaller stones. remember...
[stevieb]: I'm working on it to fatten it up and make it more reliant so I can finalize my Raspberry Pi automated build system for that software :) It's all well and fun, until I try to make it work with Windows lol
[shmem]: "debugging a program is more difficult than to write it in the first place. If you code your program as smart as you are, you are, by definition, too dumb to debug it."

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2017-03-28 22:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (342 votes). Check out past polls.