Subject: | write_file() should return true on success / please document return value of write_file() |
Date: | Sun, 5 Jul 2015 02:25:17 +0200 |
To: | bug-File-Slurp-Tiny [...] rt.cpan.org |
From: | Axel Beckert <abe [...] deuxchevaux.org> |
Hi,
I've tried to switch from File::Slurp to File::::Tiny and it failed in
a situation like this:
use Test::More;
ok( write_file('/tmp/foo', foo), 'Write foo to foo');
File::Slurp::Tiny's write_file() does seem to return false in that
case.
Actually this ticket are two related requests:
* write_file() should return true on success as File::Slurp's
write_file() does. File::Slurp's documentation says "By default
"write_file" returns 1 upon successfully writing the file or undef
if it encountered an error."
* The return value of write_file() is not documented in POD. Please
add it to the documentation.
Please tell me if I should rather report such cases as two separate
issues in the future.
Kind regards, Axel
--
/~\ Plain Text Ribbon Campaign | Axel Beckert
\ / Say No to HTML in E-Mail and News | abe@deuxchevaux.org (Mail)
X See http://www.nonhtmlmail.org/campaign.html | abe@noone.org (Mail+Jabber)
/ \ I love long mails: http://email.is-not-s.ms/ | http://abe.noone.org/ (Web)