Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: auto-vivifying file handlesby spudzeppelin (Pilgrim) |
on Sep 25, 2001 at 19:41 UTC ( [id://114559]=note: print w/replies, xml ) | Need Help?? |
This makes me wonder about whether or not we should have a cousin of the strict pragma ("marshalled"?) that would cause a compile-time error if a filehandle was used outside of the scope in which the open statement that created it would ordinarily live if it were a my, and a warning emitted if a potential conflict was detected in filehandle namespace (e.g. "Filehandle ZZZ declared at line 52, also declared at line 47 of module Barr::Baz imported by use statement at line 12."). And THIS also makes me wonder about whether we need to impose stricter standards (a la CPANTS) regarding filehandle naming and localization conventions within CPAN modules. In other words, that module authors should be using the method John described to insure proper scoping of filehandles. Spud Zeppelin * spud@spudzeppelin.com
In Section
Meditations
|
|