Skip Menu |

This queue is for tickets about the File-Slurper CPAN distribution.

Report information
The Basics
Id: 127993
Status: open
Priority: 0/
Queue: File-Slurper

People
Owner: Nobody in particular
Requestors: MTHURN [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.012
Fixed in: (no value)



Subject: does not throw error when disk fills during write
If the disk fills while write_text is writing, it leaves the file with partial data and DOES NOT THROW ANY ERROR. Incredibly bad behavior. You have to check for errors on every disk operation.
Subject: Re: [rt.cpan.org #127993] does not throw error when disk fills during write
Date: Tue, 11 Dec 2018 23:10:33 +0100
To: bug-File-Slurper [...] rt.cpan.org
From: Leon Timmermans <leont [...] cpan.org>
On Tue, Dec 11, 2018 at 5:23 PM Martin Thurn via RT <bug-File-Slurper@rt.cpan.org> wrote: Show quoted text
> If the disk fills while write_text is writing, it leaves the file with partial data and DOES NOT THROW ANY ERROR. Incredibly bad behavior. You have to check for errors on every disk operation.
Hi Martin, Well actually it is checking for errors on every disk operation (open, print and close), so I'm not understanding how this can happen. Do you have a simple test-case that allows you to reproduce this? Leon
Hmmm, this is embarrassing and I apologize for the tone of my original report... I don't remember the exact circumstances when I wrote that, maybe I was just doing it wrong, but as of now I am using the below code to catch errors and it seems to be working. if (not eval { write_text($sFname, $sContent); 1 }) { warn "failed to write into $sFname, unknown reason"; } if ($@) { warn "failed to write into $sFname: $@"; }