Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^4: Syntax checking without BEGIN blocks

by Anonymous Monk
on May 01, 2006 at 21:16 UTC ( #546767=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Syntax checking without BEGIN blocks
in thread Syntax checking without BEGIN blocks

Syntax checking can't stop someone from writing syntactically correct, non-BEGIN block, destructive code. All they have to do is bury something like system("rm -rf *") in the module somewhere and you will have lots of fun trying to find out why your system doesn't work.

True. However, if the code doesn't pass a basic syntax check, I don't need to waste my time deciphering it. I know it doesn't run. If it is code that's syntactically correct, something might be using it...


Comment on Re^4: Syntax checking without BEGIN blocks
Re^5: Syntax checking without BEGIN blocks
by adrianh (Chancellor) on May 02, 2006 at 10:59 UTC
    True. However, if the code doesn't pass a basic syntax check, I don't need to waste my time deciphering it. I know it doesn't run. If it is code that's syntactically correct, something might be using it...

    If I'm not worried about the code doing anything dangerous then there is no difference to me between a compile-type error and a run-time error. Both will show up in my test suite.

    If I am worried about the code I'm going to have to understand it - whether it is "syntactically" correct or not.

      If I am worried about the code I'm going to have to understand it - whether it is "syntactically" correct or not.

      If it's not "syntactially" correct; it's not code. It's either unused, or data provided to something that is code. I need to understand the code; then I can learn what it does with the data.

      Debugging data is a futile waste of time. Debugging code is not.

        If it's not "syntactially" correct; it's not code. It's either unused, or data provided to something that is code. I need to understand the code; then I can learn what it does with the data.

        Yes - but what you seem to be saying is that debugging somehow becomes a great deal more dangerous if you cannot syntax check your program without running BEGIN blocks, etc.

        If that is what you're saying then I don't understand it - since it is manifestly not true in my experience.

        If that isn't what you're saying then you need to restate it so poor fools like me can understand what you're getting at.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (14)
As of 2014-08-01 14:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (25 votes), past polls