Skip Menu |
 

This queue is for tickets about the autodie CPAN distribution.

Report information
The Basics
Id: 99402
Status: new
Priority: 0/
Queue: autodie

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

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



Subject: autodie fails to deduce filename for open FILEHANDLE
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Message-ID: <rt-4.0.18-21586-1412887013-106.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 1164
Download (untitled) / with headers
text/plain 1.1k
AFAIK, when open fails, autodie's intends to show an error message with the name of the file that could not be opened: Error message from the following script should be "Can't open('does not exist'): ..." $ cat 0.pl #!/usr/bin/env perl use autodie; use strict; use warnings; our $FILE = 'does not exist'; open FILE; $ ./0.pl Can't open('FILE'): No such file or directory at ./0.pl line 8 On OSX, dtruss shows: xxxx/yyyyyy: open("does not exist\0", 0x0, 0x1B6) = -1 Err#2 On Linux, strace shows: open("does not exist.txt", O_RDONLY) = -1 ENOENT (No such file or directory) To my dismay, I found that perldoc -f open in most recent versions of Perl don't have this, but versions as recent as 5.18.2 explain what happens when open is invoked with a single argument: If EXPR is omitted, the global (package) scalar variable of the same name as the FILEHANDLE contains the filename. For other info, see: http://blog.nu42.com/2014/10/a-bug-in-perls-autodie.html http://blog.nu42.com/2014/10/why-was-documentation-for-single.html Clearly, `open FILENAME` cannot be recommended, so I am putting very low priority on this, but FYI. Thank you, -- Sinan


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.