Hi Bill and Brian, Bill Luebkert wrote on Fri, Jul 03, 2009 at 04:26:46AM -0700: > Brian Raven wrote:
>> I would advise using the 3 argument form of open, >> localise the file handle, > Neither of those suggestions 'should' change a thing. No, but they are excellent advice anyway, and a strict style can help a lot when chasing bugs. The two-argument form of open(3p) really ought to be considered legacy, and there is no excuse for using it in new code, except in very special circumstances. I feel two-argument open nearly as ugly as the failure to use strict and warnings. At least, the multi-argument form is required for anything security-related. Even in cases where two-argument open can actually been proven to be correct as well, like in the case discussed here, the correctness of the multi-argument form is definitely easier to verify by code inspection, so using it is always a gain in security. The same applies to non-local file handles. They should have no place in new code, except in very special circumstances. I think the regulars should consistently encourage good coding practices (which both of you almost always do, thanks!), even if the sloppiness at hand cannot be proven to be causing the problem or to be hiding the cause of the problem presented. Yours, Ingo -- Ingo Schwarze <[email protected]> | Software Engineer | Framework Team Astaro AG | www.astaro.com | 76227 Karlsruhe | Germany _______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
