Bug#733680: libio-all-perl: io->file->assert creates directory instead of file
Axel Beckert
abe at debian.org
Mon Dec 30 23:39:24 UTC 2013
Package: libio-all-perl
Version: 0.50-1
Severity: important
Control: block 730895 by -1
According to the POD, io->file "sets the type of the object to file and
sets the pathname of the file if provided. Nevertheless, the following
code (taken from POD's "create-cat-to" example) running in an empty
directory generates a directory instead of a file:
$ 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 the previous 0.46-1 version of the package, 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
$
(Yes, IO::All overloads the ">" operator.)
This unexpected behaviour change caused libspork-perl FTBFS (and not
working in general), see http://bugs.debian.org/730895
Interestingly, this doesn't happen if I remove the assert method call --
then it works as expected (example from version 0.50-1 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 probably also the way how we can fix #730895 without waiting for a
fix in libio-all-perl. But the code to change this is in libspoon-perl
and not libspork-perl. So maybe the best way to fix this would be in
libio-all-perl anyway.
BTW, I'm not sure which of these upstream changes caused this
regression:
---
version: 0.50
date: Fri Oct 18 13:08:41 PDT 2013
changes:
- Fix for rt87200
---
version: 0.49
date: Fri Oct 18 01:05:39 CDT 2013
changes:
- Fix various tests on Windows
---
version: 0.48
date: Tue Oct 8 01:45:39 CDT 2013
changes:
- Add ->os method to ::Filesys (Arthur Axel "fREW" Schmidt)
---
version: 0.47
date: Mon Sep 30 18:57:52 CDT 2013
changes:
- Add ->glob method to ::Dir (Arthur Axel "fREW" Schmidt)
- Add list based constructors to ::Dir and ::File (Arthur Axel "fREW" Schmidt)
- Add ->mimetype method to ::FileSys (Arthur Axel "fREW" Schmidt)
- Add ->ext method to ::FileSys (Arthur Axel "fREW" Schmidt)
- All tests should be parallelizable (Shlomi Fish)
---
Also a debdiff between 0.46-1 and 0.50-1 shows nothing obvious or
suspicious.
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (990, 'unstable'), (900, 'testing'), (899, 'testing-proposed-updates'), (600, 'stable'), (500, 'proposed-updates'), (200, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 3.12-trunk-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages libio-all-perl depends on:
ii libspiffy-perl 0.31-1
ii perl 5.18.1-5
libio-all-perl recommends no packages.
Versions of packages libio-all-perl suggests:
pn libdb-file-lock-perl <none>
ii libfile-readbackwards-perl 1.05-1
ii libfreezethaw-perl 0.5001-1
ii libio-string-perl 1.08-3
pn libmldbm-perl <none>
-- no debconf information
More information about the pkg-perl-maintainers
mailing list