Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^5: File::Temp survival and scope created by "do"

by Eily (Monsignor)
on Dec 10, 2018 at 23:22 UTC ( [id://1227070]=note: print w/replies, xml ) Need Help??


in reply to Re^4: File::Temp survival and scope created by "do"
in thread File::Temp survival and scope created by "do"

The thing is, do always has a return value, if you put ; 1 after the assignment that value is just always 1. Also, since the defect also disappears when you put 1; in front of the assignment, that's why I concluded that it was not about what do returns but rather how many statements are included.

I also looked at the output of B::Concise, but immediatly concluded that I didn't understand much about it, so I didn't want to draw conclusions on something I had so little grasp on :P

As for the bug, I guess you're right, I said that the bug shouldn't happen, because there's no need for a lexical in a single statement block, but you don't have to look very far to find one occurence of the issue ... since we're discussing it :P

Replies are listed 'Best First'.
Re^6: File::Temp survival and scope created by "do"
by ikegami (Patriarch) on Dec 11, 2018 at 12:46 UTC

    -MO=Concise basics:

    • The name of the opcode is followed by flags that are mostly opcode-specific. The exceptions are leading "v"oid, "s"calar and "l"ist, which indicate the context of the opcode.
    • The letters/numbers in the first column are labels generated by B::Concise.
    • A label of "-" denotes an unreachable opcode.
    • A name starting with "ex-" denotes an unreachable opcode.
    • -> is followed by the label of the next opcode in the program.
    • The -exec option (-MO=Concise,-exec) shows the opcodes in the order they are executed, leaving out removed opcodes.
Re^6: File::Temp survival and scope created by "do"
by haukex (Archbishop) on Dec 11, 2018 at 11:17 UTC
    I concluded that it was not about what do returns but rather how many statements are included

    Yes, your example definitely shed more light on the issue and made it clear my guess was wrong and it's not about the return value, I didn't mean to imply otherwise :-)

Re^6: File::Temp survival and scope created by "do"
by xiaoyafeng (Deacon) on Dec 11, 2018 at 06:32 UTC
    I also looked at the output of B::Concise, but immediatly concluded that I didn't understand much about it, so I didn't want to draw conclusions on something I had so little grasp on :P

    Maybe you should try B::Terse first? ;)





    I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-03-28 23:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found