rwstauner/Dist-Metadata — pull request #7 by miyagawa (2013-04-20 03:55:23+00:00)
Title: Problems with tarballs with entry with "./" in front

```
use Carp::Always;
use Dist::Metadata;

$m = Dist::Metadata->new(file => shift);
warn (($m->dist->find_files)[0]);
$m->dist->file_content(($m->dist->perl_files)[0]);
```

```
> perl metadata.pl ~/minicpan/authors/id/A/AL/ALTITUDE/MsqlCGI-0.8.tar.gz
./MsqlCGI-0.8/MsqlCGI-bin/CreateDef.pl at -e line 1.
No such file in archive: 'MsqlCGI-0.8/MsqlCGI-bin/MsqlCGI.pm' at /Users/miyagawa/.plenv/versions/5.16.3/lib/perl5/5.16.3/Archive/Tar.pm line 1581.
Archive::Tar::_error('Archive::Tar=HASH(0x7fc00c04f090)', 'No such file in archive: \'MsqlCGI-0.8/MsqlCGI-bin/MsqlCGI.pm\'') called at /Users/miyagawa/.plenv/versions/5.16.3/lib/perl5/5.16.3/Archive/Tar.pm line 1038
Archive::Tar::_find_entry('Archive::Tar=HASH(0x7fc00c04f090)', 'MsqlCGI-0.8/MsqlCGI-bin/MsqlCGI.pm') called at /Users/miyagawa/.plenv/versions/5.16.3/lib/perl5/5.16.3/Archive/Tar.pm line 1074
Archive::Tar::get_content('Archive::Tar=HASH(0x7fc00c04f090)', 'MsqlCGI-0.8/MsqlCGI-bin/MsqlCGI.pm') called at /Users/miyagawa/.plenv/versions/5.16.3/lib/perl5/site_perl/5.16.3/Dist/Metadata/Tar.pm line 30
Dist::Metadata::Tar::file_content('Dist::Metadata::Tar=HASH(0x7fc00c174f78)', 'MsqlCGI-0.8/MsqlCGI-bin/MsqlCGI.pm') called at /Users/miyagawa/.plenv/versions/5.16.3/lib/perl5/5.16.3/Archive/Tar.pm line 1581.
Archive::Tar::_error('Archive::Tar=HASH(0x7fc00c04f090)', 'No such file in archive: \'MsqlCGI-0.8/MsqlCGI-bin/MsqlCGI.pm\'') called at /Users/miyagawa/.plenv/versions/5.16.3/lib/perl5/5.16.3/Archive/Tar.pm line 1038
Archive::Tar::_find_entry('Archive::Tar=HASH(0x7fc00c04f090)', 'MsqlCGI-0.8/MsqlCGI-bin/MsqlCGI.pm') called at /Users/miyagawa/.plenv/versions/5.16.3/lib/perl5/5.16.3/Archive/Tar.pm line 1074
Archive::Tar::get_content('Archive::Tar=HASH(0x7fc00c04f090)', 'MsqlCGI-0.8/MsqlCGI-bin/MsqlCGI.pm') called at /Users/miyagawa/.plenv/versions/5.16.3/lib/perl5/site_perl/5.16.3/Dist/Metadata/Tar.pm line 30
Dist::Metadata::Tar::file_content('Dist::Metadata::Tar=HASH(0x7fc00c174f78)', 'MsqlCGI-0.8/MsqlCGI-bin/MsqlCGI.pm') called at -e line 1
```

This is probably because Dist::Metadata normalizes the path in the tar entry and eliminates the leading `./`.