Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 42235
Status: rejected
Priority: 0/
Queue: WWW-Mechanize

Owner: Nobody in particular
Requestors: h4cks4w [...]

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

Subject: follow_link() bails when find_link() fails
Download (untitled) / with headers
text/plain 1.1k
In follow_link(): *snip* my $link = $self->find_link(%parms); return $self->get( $link->url ) if $link; $self->die( 'Link not found: ', $link->url ) if $self->{autocheck}; *snip* if find_link() fails (e.g. $mech->follow_link(text_regex => qr/Next/) when there is no Next link) $link->url is broken. I get: Can't call method "url" on an undefined value at /usr/lib/perl5/site_perl/5.8.8/WWW/ line 707. It seems that find_link() does not perform autocheck if it fails (makes sense to me) so perhaps follow_link() should not perform this check when find_link() fails. Dunno, just thought I'd mention this. Environment data: Centos 5.2 x86_64 Linux kernel 2.6.26 [tstrader@python ~]$ perl -v This is perl, v5.8.8 built for x86_64-linux-thread-multi Copyright 1987-2006, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at, the Perl Home Page.
I don't get any failures. I think this has been fixed.
Download (untitled) / with headers
text/plain 613b
I do not think that this has been fixed: fany@bigblue:~> perl -MWWW::Mechanize -le 'print WWW::Mechanize->VERSION;($m=WWW::Mechanize->new)->get(""); $m->follow_link(text=>"foo")' 1.58 Can't call method "url" on an undefined value at /usr/local/lib/perl5/site_perl/5.10.0/WWW/ line 713. Again, here's the code from ->follow_link(): my $link = $self->find_link(%parms); return $self->get( $link->url ) if $link; $self->die( 'Link not found: ', $link->url ) if $self->{autocheck}; Since ->find_link() returns undef on failure, how should the call to $link->url work?
Download (untitled) / with headers
text/plain 129b
This is not the place for WWW::Mechanize tickets. Please look in the docs for the URL to the Google Code repository bug tracker.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to