Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Style or Clarity?

by dave_the_m (Monsignor)
on Jun 08, 2004 at 21:34 UTC ( [id://362566]=note: print w/replies, xml ) Need Help??


in reply to Style or Clarity?

B::Deparse reported this construct as an empty list
if ($tmp eq 'F') { (); }elsif ...
OK, so is an empty list placed at this point in the bytecode so that when reached, the program evaluates the list? In what context? Or is this just a shorthand display for some NOOP code?
The actual bytecode at this point is a single 'stub' op, whose action is to return undef in a scalar context and nothing otherwise. In your example, it's called in a void context. The empty list happens to compile to the same op.

Dave.

Replies are listed 'Best First'.
Re^2: Style or Clarity?
by periapt (Hermit) on Jun 09, 2004 at 12:44 UTC
    Ah, so that's it. :o) Thanks

    PJ
    We are drowning in information and starving for knowledge - Rutherford D. Rogers
    What good is knowledge if you have to pull teeth to get it - anonymous

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-26 04:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found