http://www.perlmonks.org?node_id=811329


in reply to Re^4: RFC: A new module to help avoid running multiple instances of the same script (via cron, for example)
in thread RFC: A new module to help avoid running multiple instances of the same script (via cron, for example)

I guess what you're saying here is that the low-level routines that detect the errors, only set the numeric part of $!, and that the text part is derived (looked-up) from that when asked, at which point the filename used in the failing system request is no longer available.

But when a warn or die is called, it is able to tell us the line number of the last file read, and this is considered useful enough information to be added by default. A similar mechanism--presumably a global variabe ($.)--could be used to remember the pathname provided to the last open attempt, and used to provide that information when $! is interpolated.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re^5: RFC: A new module to help avoid running multiple instances of the same script (via cron, for example)