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