W3C home > Mailing lists > Public > public-qa-dev@w3.org > September 2004

Re: S::P::O and temp files

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Mon, 13 Sep 2004 04:54:46 +0200
To: Ville Skyttä <ville.skytta@iki.fi>
Cc: QA-dev <public-qa-dev@w3.org>
Message-ID: <414b0a94.163422889@smtp.bjoern.hoehrmann.de>

* Ville Skyttä wrote:
>A small note: the File::Temp manpage on my system (Perl 5.8.3) says that
>this may cause a deferred unlink on some platforms, and that the actual
>unlink is done "when the program exits".

For the OO-Interface this calls unlink1 from the destructor which calls
unlink if it can cmpstat and close the file handle, so, if we want more
control over the process, an explicite destruction of the object should
suffice, which is why the original code had an `undef $fh`.

>I've personally tried to grow a habit of always avoiding things that are
>supposed to happen at program exit (especially in libraries), and being
>explicit about such things instead.

Which is why I've used the OO-Interface rather than the procedural one.
Received on Monday, 13 September 2004 02:55:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 19 August 2010 18:12:44 GMT