diff options
author | Dominic Hargreaves <dom@earth.li> | 2016-04-30 18:03:01 +0100 |
---|---|---|
committer | Dominic Hargreaves <dom@earth.li> | 2016-04-30 18:03:23 +0100 |
commit | e52682c1b86499977ca540dd02f99bfef2531899 (patch) | |
tree | 4ab31fdef6e60b04fc72021d0cd36c062804bf8e /lib | |
parent | 5290b67bf5ccc187badf933627726c9977dd23db (diff) | |
download | perl-e52682c1b86499977ca540dd02f99bfef2531899.tar.gz |
File::Copy: add a warning about flushing writes
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=494590
Diffstat (limited to 'lib')
-rw-r--r-- | lib/File/Copy.pm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/File/Copy.pm b/lib/File/Copy.pm index 95fb4e18f3..0a6a81eeca 100644 --- a/lib/File/Copy.pm +++ b/lib/File/Copy.pm @@ -489,6 +489,14 @@ it sets C<$!>, deletes the output file, and returns 0. All functions return 1 on success, 0 on failure. $! will be set if an error was encountered. +=head1 NOTES + +Before calling copy() or move() on a filehandle, the caller should +close or flush() the file to avoid writes being lost. Note that this +is the case even for move(), because it may actually copy the file, +depending on the OS-specific inplementation, and the underlying +filesystem(s). + =head1 AUTHOR File::Copy was written by Aaron Sherman I<E<lt>ajs@ajs.comE<gt>> in 1995, |