Subject: | new from mailrc.txt.gz contents doesn't read from content. |
hello leon. I am c9s(neo) :D
Parse::CPAN::Authors->new doesnt read from content, but read from file.
it shows:
?????????(...binary...)X?m?: No such file or directory at
/opt/local/lib/perl5/site/...
my code:
--------------
use Parse::CPAN::Authors;
use LWP::Simple qw(get);
use Cache::File;
use IO::Uncompress::Gunzip qw(gunzip $GunzipError);
my $cache = Cache::File->new( cache_root => '/tmp/cpan-mailrc' );
my $mailrc_content = $cache->get('mailrc');
unless( $mailrc_content ) {
my $mailrc_content_gz =
get('http://cpan.perl.org/authors/01mailrc.txt.gz');
my $status = gunzip $mailrc_content_gz => $mailrc_content
or die "gunzip failed $GunzipError\n";
$cache->set('mailrc', $mailrc_content );
}
my $p = Parse::CPAN::Authors->new($mailrc_content);