On 2008-08-08 11:23:28 +0300, Niko Tyni wrote:
> Frankly, I don't think File::Copy is doing anything wrong.
> 
> The documentation specifically says move() will copy the file if rename()
> fails, and IMO it's clearly the responsibility of the caller to make
> sure the file is closed or at least flushed.

> The function doesn't even have any means to flush the file handle, it just
> gets the file name.

Well, this is not obvious. Even without using lsof, if Perl has
a mapping between filenames and file handles in its own internal
structures, this could be done.

Perhaps it should be documented (e.g. in NOTES) that the caller must
close the file or flush it when it is copied, in particular via move.

-- 
Vincent Lefèvre <[EMAIL PROTECTED]> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to