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

Re: die/warn bug in elsif

by merlyn (Sage)
on Jan 12, 2006 at 12:29 UTC ( [id://522758]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to die/warn bug in elsif

die and warn are happening at runtime, and from the statement that begins on line 1, so it makes sense. The 0/0 is happening at compile time, where you're compiling line 4, so it also makes sense.

Well, "makes sense" because I know what's going on behind the scenes. :)

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re^2: die/warn bug in elsif
by radiantmatrix (Parson) on Jan 13, 2006 at 10:04 UTC

    As a way of illustrating this point, here's the OP's first code block after being run through perl -MO=Deparse buggy.pl:

    if (die '4') { (); }

    The B::Deparse module (called by the above command) shows you the Perl equivalent of what the interpreter sees at runtime. This is extremely useful for finding this "compile-time vs. run-time" class of behaviors.

    <-radiant.matrix->
    A collection of thoughts and links from the minds of geeks
    The Code that can be seen is not the true Code
    "In any sufficiently large group of people, most are idiots" - Kaa's Law

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://522758]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.