Skip Menu |

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

Report information
The Basics
Id: 93158
Status: resolved
Priority: 0/
Queue: File-Slurp-Tiny

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

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



Subject: errors when converting from File::Slurp
In the Directory::Scratch code (https://github.com/karenetheridge/Directory-Scratch), and s/File::Slurp/File::Slurp::Tiny/ in .pm and .t files: : [ether@tequila git/Directory-Scratch].7$; perl -d:Confess -Ilib t/integration/01-parents_too.t 1..2 Error writing file: Inappropriate ioctl for device at lib/Directory/Scratch.pm line 244. Directory::Scratch::write(Directory::Scratch=HASH(0x100802238), "foo/bar/baz/bat/yay", "foo", "bar", "baz", "bat", "yay") called at lib/Directory/Scratch.pm line 295 Directory::Scratch::touch(Directory::Scratch=HASH(0x100802238), "foo/bar/baz/bat/yay", "foo", "bar", "baz", "bat", "yay") called at t/integration/01-parents_too.t line 12 # Looks like your test exited with 25 before it could output anything. Are not all File::Slurp options handled in the same way?
Subject: Re: [rt.cpan.org #93158] errors when converting from File::Slurp
Date: Wed, 19 Feb 2014 10:21:56 +0100
To: bug-File-Slurp-Tiny [...] rt.cpan.org
From: Leon Timmermans <fawaka [...] gmail.com>
On Wed, Feb 19, 2014 at 6:23 AM, Karen Etheridge via RT < bug-File-Slurp-Tiny@rt.cpan.org> wrote: Show quoted text
> In the Directory::Scratch code ( > https://github.com/karenetheridge/Directory-Scratch), and > s/File::Slurp/File::Slurp::Tiny/ in .pm and .t files: > > : [ether@tequila git/Directory-Scratch].7$; perl -d:Confess -Ilib > t/integration/01-parents_too.t > 1..2 > Error writing file: Inappropriate ioctl for device at > lib/Directory/Scratch.pm line 244. > Directory::Scratch::write(Directory::Scratch=HASH(0x100802238), > "foo/bar/baz/bat/yay", "foo", "bar", "baz", "bat", "yay") called at > lib/Directory/Scratch.pm line 295 > Directory::Scratch::touch(Directory::Scratch=HASH(0x100802238), > "foo/bar/baz/bat/yay", "foo", "bar", "baz", "bat", "yay") called at > t/integration/01-parents_too.t line 12 > # Looks like your test exited with 25 before it could output anything. > > Are not all File::Slurp options handled in the same way? >
Not all File::Slurp options are handled yet (though I'm open to implementing most), but more importantly it's not always a drop-in replacement: it's meant as a sane replacement above all. In this case, the problem is that they disagree on argument order. File::Slurp's write_file has an optional middle argument ($filename, $options?, $data), which I think is crazy. File::Slurp::Tiny uses ($filename, $data, %options). I should add a section to the documentation about conversion from File::Slurp, to prevent this sort of issue. Leon
On Wed Feb 19 04:22:26 2014, fawaka@gmail.com wrote: Show quoted text
> Not all File::Slurp options are handled yet (though I'm open to > implementing most), but more importantly it's not always a drop-in > replacement: it's meant as a sane replacement above all. > > In this case, the problem is that they disagree on argument order. > File::Slurp's write_file has an optional middle argument ($filename, > $options?, $data), which I think is crazy. File::Slurp::Tiny uses > ($filename, $data, %options).
I now consider this a mistake. I wish F::S::T was a drop-in replacement so I have my hands free for something that is more to my own tastes. I'm not sure if I can still change this though. Leon
Subject: Re: [rt.cpan.org #93158] errors when converting from File::Slurp
Date: Sat, 24 May 2014 09:49:43 -0700
To: Leon Timmermans via RT <bug-File-Slurp-Tiny [...] rt.cpan.org>
From: Karen Etheridge <ether [...] cpan.org>
On Sat, May 24, 2014 at 12:37:32PM -0400, Leon Timmermans via RT wrote: Show quoted text
> I now consider this a mistake. I wish F::S::T was a drop-in replacement so I have my hands free for something that is more to my own tastes. I'm not sure if I can still change this though.
I wonder if we could write some compatibility interfaces in Path::Tiny instead, to ease migration?