Hi
Below are 2 bugs that I had found in the lastest version of
WWW::Wikipedia
The use of ->decoded_content instead of ->content is just the
preferred approach for LWP::UserAgent
Also you can find the fix for both bugs attached
#### Code to reporduce the problem 1 #### -> returns undef
perl -MWWW::Wikipedia -MData::Dumper -e 'my $wiki = WWW::Wikipedia->new(
language => "en" ); $wiki->follow_redirects( 1 ); print
Dumper($wiki->search( "Parabat" ) );'
#### Code to reporduce the problem 2 #### -> deep recursion on subroutine
perl -MWWW::Wikipedia -MData::Dumper -e 'my $wiki = WWW::Wikipedia->new(
language => "en" ); $wiki->follow_redirects( 1 ); print
Dumper($wiki->search( "Unplugged_II" ) );'
WWW-Wikipedia-1.99
Kind Regards,
Sorin Pop
158c158
< my $entry = WWW::Wikipedia::Entry->new( $response->content(),
$src );
---
Show quoted text
> my $entry = WWW::Wikipedia::Entry->new(
$response->decoded_content(), $src );
163c163
< && $entry->text() =~ /^#REDIRECT ([^\r\n]+)/is;
---
Show quoted text> && $entry->text() =~ /^#REDIRECT (.+?)\r?\n?/is;