Skip Menu |

This queue is for tickets about the autodie CPAN distribution.

Report information
The Basics
Id: 47520
Status: resolved
Priority: 0/
Queue: autodie

People
Owner: PJF [...] cpan.org
Requestors: mschwern [...] cpan.org
Cc:
AdminCc:

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



Subject: Double "at X line Y" from 2 arg open
$ perl -wle 'use autodie; open my $fh, "lkfflkj"' Can't open($fh, 'lkfflkj'): No such file or directory at -e line 1 at -e line 1 3 arg open does not exhibit this problem. This happens with 2.04 and earlier versions (haven't checked exactly how far back).
G'day Schwern, On Thu Jul 02 16:25:29 2009, MSCHWERN wrote: Show quoted text
> $ perl -wle 'use autodie; open my $fh, "lkfflkj"' > Can't open($fh, 'lkfflkj'): No such file or directory at -e line 1 > at -e line 1 > > 3 arg open does not exhibit this problem. > > This happens with 2.04 and earlier versions (haven't checked exactly how > far back).
I'm pretty sure it happens *all* the way back. Interestingly enough, open($fh, '< lkfflkj') (2-arg, but with explicit mode) works fine. It looks like this is a combination of bugs. One is autodie wouldn't detect a file open for reading unless the second argument started with a less-than sign. The other is that when _format_open() falls back to defaults (which is does when it can't detect the mode), it adds extra file/line info. These are now fixed as of commit 8b12854, which will enter the next release of autodie. If you're eager to play with it now, you can grab it from http://github.com/pfenwick/autodie/ Many thanks for the bug report, Paul