Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: Different behaviour of 'stat' function after assignment to $! (errno).

by ikegami (Pope)
on May 24, 2011 at 15:56 UTC ( #906523=note: print w/replies, xml ) Need Help??


in reply to Re^2: Different behaviour of 'stat' function after assignment to $! (errno).
in thread Different behaviour of 'stat' function after assignment to $! (errno).

pNOK is now set, but the value hasn't been updated by stat itself. It's only when $! is referenced that the updated value materializes.

Correct. It's set by SvGETMAGIC, which is called when the value of a magic SV is needed. The state of pNOK and the like should be completely ignored by -$! since negation should call SvGETMAGIC, but negation isn't calling SvGETMAGIC in the OP's version of Perl.

  • Comment on Re^3: Different behaviour of 'stat' function after assignment to $! (errno).
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://906523]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2018-07-15 23:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (327 votes). Check out past polls.

    Notices?