Skip Menu |

This queue is for tickets about the libwww-perl CPAN distribution.

Report information
The Basics
Id: 48782
Status: rejected
Priority: 0/
Queue: libwww-perl

People
Owner: Nobody in particular
Requestors: 643opk102 [...] sneakemail.com
Cc: 643opk102 [...] sneakemail.com
AdminCc:

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



CC: 643opk102 [...] sneakemail.com
Subject: click_button does not check for errors
$ perl -w click-error-1.pl # attached file Can't call method "find_input" on an undefined value at /usr/share/perl5/WWW/Mechanize.pm line 1716. $ perl -w click-error-2.pl Can't call method "header" on an undefined value at /usr/share/perl5/WWW/Mechanize.pm line 2381. $ perl -w click-error-3.pl Can't call method "click" on an undefined value at /usr/share/perl5/WWW/Mechanize.pm line 1705. $ perl -w click-error-4.pl Can't call method "find_input" on an undefined value at /usr/share/perl5/WWW/Mechanize.pm line 1708. and so on. I'd expect something similar to $ perl -MWWW::Mechanize -e ' my $m = WWW::Mechanize->new(); $m->get("http://cpan.org/no-such-url");' Error GETing http://cpan.org/no-such-url: Not Found at -e line 3
Hard to tell what this is about without any example programs.
On Mon Aug 17 17:07:03 2009, GAAS wrote: Show quoted text
> Hard to tell what this is about without any example programs.
Looks like the programs didn't get uploaded. Oops. Retrying the upload.
#! /usr/bin/perl -w use WWW::Mechanize; my $mech = WWW::Mechanize->new(); $mech->get('http://perldoc.perl.org'); # site with form $mech->click_button(value => 'does not exist'); # Can't call method "header" on an undefined value at # /usr/share/perl5/WWW/Mechanize.pm line 2381.
use WWW::Mechanize; my $mech = WWW::Mechanize->new(); $mech->get('http://cpan.org'); # site without form $mech->click_button(number => 1); # Can't call method "find_input" on an undefined value at # /usr/share/perl5/WWW/Mechanize.pm line 1708.
use WWW::Mechanize; my $mech = WWW::Mechanize->new(); $mech->get('http://cpan.org'); # site without form #$mech->click_button(name => 'does not exist'); # Can't call method "click" on an undefined value at # /usr/share/perl5/WWW/Mechanize.pm line 1705. $mech->click_button(number => 1);
use WWW::Mechanize; my $mech = WWW::Mechanize->new(); $mech->get('http://cpan.org'); # site without form $mech->click_button(name => 'does not exist'); # Can't call method "click" on an undefined value at # /usr/share/perl5/WWW/Mechanize.pm line 1705.
You would need to file this bug for the WWW-Mechanize maintainers instead. Apparently they want bugs to be filed at <http://code.google.com/p/www-mechanize/issues/list>