develooper Front page | perl.perl5.porters | Postings from July 2014

[perl #122415] whole-name-quoted filename can't be read [cpan #57586]

Thread Previous
From:
James E Keenan
Date:
July 27, 2014 23:05
Subject:
[perl #122415] whole-name-quoted filename can't be read [cpan #57586]
Message ID:
rt-4.0.18-13630-1406502308-640.122415-75-0@perl.org
# New Ticket Created by  James E Keenan 
# Please include the string:  [perl #122415]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=122415 >


[Since ExtUtils-Manifest is now primarily maintained by Perl 5 Porters, I am moving this ticket here from https://rt.cpan.org/Ticket/Display.html?id=57586. -- jkeenan]

While adding support for quoted filenames (names with spaces) to Dist::Zilla, I found this bug 
in ExtUtils::Manifest.  If you have a filename that begins and ends with quotes, and you 
enquote it as suggested, it is not properly dequoted.

use strict;
use ExtUtils::Manifest qw(maniread);

---
my $manifest_content = <<'END_MANIFEST';
'\'quoted name.txt\''
END_MANIFEST

{
  open my $fh, '>', 'MANIFEST' or die;
  print $fh $manifest_content;
}

my $manifest = maniread;

print "$_\n" for keys %$manifest;
---


This should print:

  'quoted name.txt'

Instead, it prints:

  quoted name.txt'

-- 
rjbs


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About