Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Style or Clarity?

by dave_the_m (Monsignor)
on Jun 08, 2004 at 21:34 UTC ( #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.


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

    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?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2020-11-24 18:15 GMT
Find Nodes?
    Voting Booth?

    No recent polls found