Skip Menu |

This queue is for tickets about the WWW-Scripter CPAN distribution.

Report information
The Basics
Id: 72481
Status: resolved
Priority: 0/
Queue: WWW-Scripter

People
Owner: Nobody in particular
Requestors: tukamoto [...] ac21.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: a bug in WWW-Scripter
Date: Thu, 17 Nov 2011 15:56:13 +0900
To: bug-WWW-Scripter [...] rt.cpan.org
From: "K.Tsukamoto" <tukamoto [...] ac21.org>
Hello, I'm Kengo Tsukamoto, Nagoya University in Japan. I found a bug in WWW-Scripter, so I'm sending this mail. OS: CentOS 6.0 ( 2.6.32-71.29.1.el6.i686 ) Perl: 5.10.1 i386 WWW-Scripter 0.023 Summary: My program with WWW-Scripter stops when it accesses a domain that returns IP address "0.0.0.0", but with WWW-Mechanize it doesn't stop. Detail: The domain "coloquel.com" is "0.0.0.0" ## source use WWW::Scripter; my $w = WWW::Scripter->new( autocheck=>0 ); $w->get( 'http://coloquel.com/' ); $w->find_all_links(); print "hoge\n"; ## result (scripter.pl) [root@localhost ~]# perl scripter.pl Can't call method "links" on an undefined value at /usr/local/share/perl5/WWW/Scripter.pm line 555. [root@localhost ~]# ## source (mech.pl) use WWW::Mechanize; my $mech = WWW::Mechanize->new( autocheck=>0 ); $mech->get( 'http://coloquel.com/' ); $mech->find_all_links(); print "hoge\n"; ## result [root@localhost ~]# perl mech.pl hoge [root@localhost ~]# Regards, -- /* *************************************** */ // Kengo TSUKAMOTO // Takakura Laboratory // Dept. of Information Engineering // School of Engineering Nagoya University /* *************************************** */
On Thu Nov 17 01:56:29 2011, tukamoto@ac21.org wrote: Show quoted text
> Hello, > > I'm Kengo Tsukamoto, Nagoya University in Japan. > I found a bug in WWW-Scripter, so I'm sending this mail. > > > OS: CentOS 6.0 ( 2.6.32-71.29.1.el6.i686 ) > Perl: 5.10.1 i386 > WWW-Scripter 0.023 > > Summary: > My program with WWW-Scripter stops when it accesses a domain that returns > IP address "0.0.0.0", but with WWW-Mechanize it doesn't stop. > > Detail: > > The domain "coloquel.com" is "0.0.0.0" > > ## source > use WWW::Scripter; > my $w = WWW::Scripter->new( autocheck=>0 ); > $w->get( 'http://coloquel.com/' ); > $w->find_all_links(); > print "hoge\n"; > > ## result (scripter.pl) > [root@localhost ~]# perl scripter.pl > Can't call method "links" on an undefined value at > /usr/local/share/perl5/WWW/Scripter.pm line 555. > [root@localhost ~]# > > ## source (mech.pl) > use WWW::Mechanize; > my $mech = WWW::Mechanize->new( autocheck=>0 ); > $mech->get( 'http://coloquel.com/' ); > $mech->find_all_links(); > print "hoge\n"; > > ## result > [root@localhost ~]# perl mech.pl > hoge > [root@localhost ~]# >
I’m not able to reproduce this. Could you send me the source of the page? (I have limited web access.)
Subject: Re: [rt.cpan.org #72481] a bug in WWW-Scripter
Date: Sat, 19 Nov 2011 00:52:35 +0900
To: bug-WWW-Scripter [...] rt.cpan.org
From: "K.Tsukamoto" <tukamoto [...] ac21.org>
Show quoted text
> > I’m not able to reproduce this. Could you send me the source of the page? (I have limited web > access.) >
Do you mean that you want me to send the coloquel. com's source code? If so, I can't do it because I'm not webmaster of the server. That page will not be seen from any PCs as well as yours because of IP address of the server. My source code was not good. I should have checked a value by $w->success() before executing $w->find_all_links(). But Mechanize doesn't stop. Were you not able to reproduce the stop of the Scripter?
Sending the previous mail has failed. Please contact your admin, they can find more details in the logs.
On Fri Nov 18 10:53:13 2011, tukamoto@ac21.org wrote: Show quoted text
> > > > I’m not able to reproduce this. Could you send me the source of the
> page? (I have limited web
> > access.) > >
> > Do you mean that you want me to send the coloquel. com's source code? > If so, I can't do it because I'm not webmaster of the server. > That page will not be seen from any PCs as well as yours because of IP > address of the server. > > > My source code was not good. > I should have checked a value by $w->success() before executing > $w->find_all_links(). > > But Mechanize doesn't stop. > Were you not able to reproduce the stop of the Scripter?
No. If I change the address to 0.0.0.0, it prints "hoge" as usual. What versions of WWW::Mechanize and LWP::UserAgent are you using?
Subject: Re: [rt.cpan.org #72481] a bug in WWW-Scripter
Date: Sat, 19 Nov 2011 10:50:34 +0900
To: bug-WWW-Scripter [...] rt.cpan.org
From: "K.Tsukamoto" <tukamoto [...] ac21.org>
Show quoted text
> No. If I change the address to 0.0.0.0, it prints "hoge" as usual. What versions of
I changed my source code too. $w->get( 'http://0.0.0.0/' ); But I reproduce it. Show quoted text
> WWW::Mechanize and LWP::UserAgent are you using?
WWW::Mechanize 1.70 LWP::UserAgent 5.833
On Fri Nov 18 20:50:56 2011, tukamoto@ac21.org wrote: Show quoted text
> > No. If I change the address to 0.0.0.0, it prints "hoge" as usual.
> What versions of > > I changed my source code too. > $w->get( 'http://0.0.0.0/' ); > But I reproduce it. >
> > WWW::Mechanize and LWP::UserAgent are you using?
> > WWW::Mechanize 1.70 > LWP::UserAgent 5.833 >
Strange. I still can’t reproduce it. What happens if you remove the find_all_links call? What version of HTML::DOM are you using? And CSS::DOM? (Just brainstorming now....)
Subject: Re: [rt.cpan.org #72481] a bug in WWW-Scripter
Date: Sat, 19 Nov 2011 20:25:11 +0900
To: bug-WWW-Scripter [...] rt.cpan.org
From: "K.Tsukamoto" <tukamoto [...] ac21.org>
Show quoted text
> Strange. I still can’t reproduce it. What happens if you remove the find_all_links call? > > What version of HTML::DOM are you using? And CSS::DOM? (Just brainstorming now....) >
# scripter.pl use warnings; use strict; use WWW::Mechanize; use WWW::Scripter; print "Mech VER : " . $WWW::Mechanize::VERSION . "\n"; print "Scripter VER : " . $WWW::Scripter::VERSION . "\n"; print "LWP UA VER : " . $LWP::UserAgent::VERSION . "\n"; print "HTML DOM VER : " . $HTML::DOM::VERSION . "\n"; print "CSS DOM VER : " . $CSS::DOM::VERSION . "\n"; my $mech = WWW::Mechanize->new( autocheck=>0 ); $mech->get( 'http://0.0.0.0/' ); print "mech successful\n"; my $w = WWW::Scripter->new( autocheck=>0 ); $w->get( 'http://0.0.0.0/' ); print "scripter successful\n"; $mech = WWW::Mechanize->new( autocheck=>0 ); $mech->get( 'http://0.0.0.0/' ); $mech->find_all_links(); print "mech successful 2\n"; $w = WWW::Scripter->new( autocheck=>0 ); $w->get( 'http://0.0.0.0/' ); $w->find_all_links(); print "scripter successful 2\n"; -> Result # perl scripter.pl Mech VER : 1.70 Scripter VER : 0.023 LWP UA VER : 5.835 HTML DOM VER : 0.049 Use of uninitialized value $CSS::DOM::VERSION in concatenation (.) or string at scripter.pl line 10. CSS DOM VER : mech successful scripter successful mech successful 2 Can't call method "links" on an undefined value at /usr/local/share/perl5/WWW/Scripter.pm line 555. ----- I can't get CSS::DOM's version in above method, so I checked it by perldoc. CSS::DOM Version is 0.14. ( LWP::UA's version is upgraded. ) As can be seen from above, Mech without "find_all_links" call, Scripter without it and Scripter with it didn't stop. But Scripter with it stopped.
On Sat Nov 19 06:25:32 2011, tukamoto@ac21.org wrote: Show quoted text
> > Strange. I still can’t reproduce it. What happens if you remove the
> find_all_links call?
> > > > What version of HTML::DOM are you using? And CSS::DOM? (Just
> brainstorming now....)
> >
> > # scripter.pl > use warnings; > use strict; > use WWW::Mechanize; > use WWW::Scripter; > > print "Mech VER : " . $WWW::Mechanize::VERSION . "\n"; > print "Scripter VER : " . $WWW::Scripter::VERSION . "\n"; > print "LWP UA VER : " . $LWP::UserAgent::VERSION . "\n"; > print "HTML DOM VER : " . $HTML::DOM::VERSION . "\n"; > print "CSS DOM VER : " . $CSS::DOM::VERSION . "\n"; > > my $mech = WWW::Mechanize->new( autocheck=>0 ); > $mech->get( 'http://0.0.0.0/' ); > print "mech successful\n"; > > my $w = WWW::Scripter->new( autocheck=>0 ); > $w->get( 'http://0.0.0.0/' ); > print "scripter successful\n"; > > $mech = WWW::Mechanize->new( autocheck=>0 ); > $mech->get( 'http://0.0.0.0/' ); > $mech->find_all_links(); > print "mech successful 2\n"; > > $w = WWW::Scripter->new( autocheck=>0 ); > $w->get( 'http://0.0.0.0/' ); > $w->find_all_links(); > print "scripter successful 2\n"; > > > -> Result > > # perl scripter.pl > Mech VER : 1.70 > Scripter VER : 0.023 > LWP UA VER : 5.835 > HTML DOM VER : 0.049 > Use of uninitialized value $CSS::DOM::VERSION in concatenation (.) or > string at scripter.pl line 10. > CSS DOM VER : > mech successful > scripter successful > mech successful 2 > Can't call method "links" on an undefined value at > /usr/local/share/perl5/WWW/Scripter.pm line 555. > > ----- > > I can't get CSS::DOM's version in above method, so I checked it by > perldoc. > CSS::DOM Version is 0.14. > > ( LWP::UA's version is upgraded. ) > > As can be seen from above, Mech without "find_all_links" call, > Scripter > without it and Scripter with it didn't stop. > But Scripter with it stopped.
Thank you for being so patient. It turns out I couldn’t reproduce it due to a local web server and a local proxy. I’ve managed to reproduce it, fixed it, and released version 0.024.