in reply to Catching errors in closing lexical filehandles
Planning ahead for Perl 6, and after reading this thread, it seems best to get used to calling close() explicitly. AFAICT, in Perl 6, by default, the file handle will not get closed until a Dead Object Detection (DOD) run is triggered, which is not guaranteed to happen on scope exit.
This is because Parrot will replace Perl 5's simple reference counting with full garbage collection. Though languages (such as Perl 5) that run on Parrot can implement traditional Perl 5-style reference counting/timely destruction semantics, it seems likely that doing so will incur a performance penalty (triggering a DOD run on scope exit, for instance).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Catching errors in closing lexical filehandles
by gaal (Parson) on Sep 27, 2004 at 09:36 UTC | |
by dragonchild (Archbishop) on Sep 27, 2004 at 12:29 UTC | |
by gaal (Parson) on Sep 27, 2004 at 13:20 UTC | |
by tilly (Archbishop) on Sep 27, 2004 at 22:17 UTC | |
by BrowserUk (Patriarch) on Sep 28, 2004 at 02:19 UTC |