in reply to Re^6: unquoted string error??!!
in thread unquoted string error??!!

Well, I never said this (the original code anyway) was my code. And at least one other person sometimes closes files without checking the return value :-)

Replies are listed 'Best First'.
Re^8: unquoted string error??!!
by tchrist (Pilgrim) on May 04, 2011 at 22:58 UTC
    Do you think that is somehow not a bug? It certainly is.

    However, whether it’s a bug only in his code, or a bug in the runtime, is a perfectly reasonable point. Anything that is absolutely required to guarantee correct behaviour is too important to be left up to programmers to forget to do correctly, and so should so should be taken care of for them.

    We’ve considered a DESTROY method that would detect and report this, fatally if autodie is enabled. There is never any reason to ignore the return of open, nor likewise that of close, because doing so makes your program just as unacceptably unreliable as a program that has “only a small” race condition would be.

    If Perl is going to go sneaking behind your back to run a close, then it needs to do it the right way, not the wrong way.

      If Perl is going to go sneaking behind your back to run a close, then it needs to do it the right way, not the wrong way.

      If you feel that way file a bug report, see perlbug