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

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

Thread Previous
James E Keenan
July 27, 2014 23:05
[perl #122415] whole-name-quoted filename can't be read [cpan #57586]
Message ID:
# 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: >

[Since ExtUtils-Manifest is now primarily maintained by Perl 5 Porters, I am moving this ticket here from -- 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\''

  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'


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About