Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1 CPAN search HTML Entities problem

open
nobody
None
5
2010-11-16
2010-11-16
Anonymous
No

Configuration Ubuntu 10.10 amd64, perl v5.10.1, perlmod 1.1

When I used the install or cpan search commands, the search results were encoded with html entities, and all installs failed.
I solved the problem using HTML::Entities (http://search.cpan.org/~gaas/HTML-Parser-3.68/lib/HTML/Entities.pm) module and updating the getContentUrl sub like this :
sub getContentUrl(){
my($url) = @_;
$content = `wget --tries=45 -nv --force-html -O - $url`;
$content =~ s/\n//g;
$content =~ s/\r//g;
$content =~ s/\r\n//g;
return HTML::Entities::decode($content);

}

Discussion

  • Geo Varghese
    Geo Varghese
    2010-12-27

    Thanks a lot for the fix and I have included it in the new version.