Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the IO-All CPAN distribution.

Report information
The Basics
Id: 91750
Status: resolved
Priority: 0/
Queue: IO-All

People
Owner: Nobody in particular
Requestors: abe [...] debian.org
Cc:
AdminCc:

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



Subject: Regression: io->file->assert creates directory instead of file since at least 0.50
Date: Tue, 31 Dec 2013 03:03:24 +0100
To: bug-IO-All [...] rt.cpan.org
From: Axel Beckert <abe [...] debian.org>
Hi, Spork's test suite fails since at least IO-All's 0.50 release, see http://bugs.debian.org/730895 I suspect that the relevant change was introduced in 0.47, but I've just tested 0.46 (works), 0.50 (fails), and 0.51 (fails, too) so far. Reason for Spork's test-suite failing (inside Spoon::Installer code btw.) is the following (undocumented and hence likely unwanted) regression: According to the POD, io->file "sets the type of the object to file and sets the pathname of the file if provided". But the following code (taken from "perldoc IO::All"'s "create-cat-to" example) running in an empty directory generates a directory instead of a file in at least 0.50 and 0.51: $ ls -l; echo foo | perl -MIO::All -e 'io("-") > io->file("bar")->assert'; ls -l total 0 Can't open file 'bar' for output: Is a directory at -e line 1. total 0 drwxr-xr-x 1 abe abe 0 Dec 30 23:51 bar/ $ With IO-All 0.46, this worked fine: $ ls -l; echo foo | perl -MIO::All -e 'io("-") > io->file("bar")->assert'; ls -l total 0 total 4 -rw-r--r-- 1 abe abe 4 Dec 30 23:56 bar $ Interestingly, this doesn't happen if I remove the assert method call -- then it works as expected (example from version 0.50 again): $ ls -l; echo foo | perl -MIO::All -e 'io("-") > io->file("bar")'; ls -l total 0 total 4 -rw-r--r-- 1 abe abe 4 Dec 31 00:21 bar $ This issue is tracked in Debian at http://bugs.debian.org/733680 Regards, Axel -- ,''`. | Axel Beckert <abe@debian.org>, http://people.debian.org/~abe/ : :' : | Debian Developer, ftp.ch.debian.org Admin `. `' | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE `- | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5
On Mon Dec 30 21:03:38 2013, abe@debian.org wrote: Show quoted text
> Hi, > > Spork's test suite fails since at least IO-All's 0.50 release, see > http://bugs.debian.org/730895 > > I suspect that the relevant change was introduced in 0.47, but I've > just tested 0.46 (works), 0.50 (fails), and 0.51 (fails, too) so far. > > Reason for Spork's test-suite failing (inside Spoon::Installer code > btw.) is the following (undocumented and hence likely unwanted) > regression: > > According to the POD, io->file "sets the type of the object to file > and sets the pathname of the file if provided". > > But the following code (taken from "perldoc IO::All"'s "create-cat-to" > example) running in an empty directory generates a directory instead > of a file in at least 0.50 and 0.51: > > $ ls -l; echo foo | perl -MIO::All -e 'io("-") > io->file("bar")-
> >assert'; ls -l
> total 0 > Can't open file 'bar' for output: > Is a directory at -e line 1. > total 0 > drwxr-xr-x 1 abe abe 0 Dec 30 23:51 bar/ > $ > > With IO-All 0.46, this worked fine: > > $ ls -l; echo foo | perl -MIO::All -e 'io("-") > io->file("bar")-
> >assert'; ls -l
> total 0 > total 4 > -rw-r--r-- 1 abe abe 4 Dec 30 23:56 bar > $ > > Interestingly, this doesn't happen if I remove the assert method call > -- > then it works as expected (example from version 0.50 again): > > $ ls -l; echo foo | perl -MIO::All -e 'io("-") > io->file("bar")'; ls > -l > total 0 > total 4 > -rw-r--r-- 1 abe abe 4 Dec 31 00:21 bar > $ > > This issue is tracked in Debian at http://bugs.debian.org/733680 > > Regards, Axel
Fixed in git, will release shortly