Skip Menu |

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

Report information
The Basics
Id: 94139
Status: open
Priority: 0/
Queue: File-Slurp-Tiny

People
Owner: Nobody in particular
Requestors: jrw32982 [...] yahoo.com
Cc:
AdminCc:

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



Subject: File::Slurp::Tiny v0.003 read_dir
Date: Mon, 24 Mar 2014 04:36:39 -0700 (PDT)
To: "bug-File-Slurp-Tiny [...] rt.cpan.org" <bug-File-Slurp-Tiny [...] rt.cpan.org>
From: John Wiersba <jrw32982 [...] yahoo.com>
Hi, Leon, I was just looking at the source for File::Slurp::Tiny (v0.003) and found that read_dir() has a bug.  Read_dir() fails to return a filename like ".\n" or "..\n" (where \n is newline).  For this reason, I (almost) never use "$" in a regex without /m -- I always use "\z". To reproduce: mkdir junk && cd junk >/dev/null && touch x $'.\n' && perl -e ' use File::Slurp::Tiny qw(read_dir); print "<$_>\n" for read_dir "." ' Thanks! -- John
Subject: Re: [rt.cpan.org #94139] File::Slurp::Tiny v0.003 read_dir
Date: Mon, 24 Mar 2014 12:54:59 +0100
To: bug-File-Slurp-Tiny [...] rt.cpan.org
From: Leon Timmermans <leont [...] cpan.org>
On Mon, Mar 24, 2014 at 12:36 PM, John Wiersba via RT < bug-File-Slurp-Tiny@rt.cpan.org> wrote: Show quoted text
> Hi, Leon, > > I was just looking at the source for File::Slurp::Tiny (v0.003) and found > that read_dir() has a bug. Read_dir() fails to return a filename like > ".\n" or "..\n" (where \n is newline). For this reason, I (almost) never > use "$" in a regex without /m -- I always use "\z". > > To reproduce: > > mkdir junk && > > cd junk >/dev/null && > touch x $'.\n' && > perl -e ' use File::Slurp::Tiny qw(read_dir); print "<$_>\n" for read_dir > "." ' >
Good catch! Thanks for the report, I'll fix that in the next version. Leon