Skip Menu |

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

Report information
The Basics
Id: 51632
Status: resolved
Priority: 0/
Queue: WWW-Mechanize-FireFox

People
Owner: Nobody in particular
Requestors: carey [...] frieduck.com
Cc:
AdminCc:

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



Subject: Can't call method "__click" on an undefined value at ...WWW/Mechanize/FireFox.pm line 844, <DATA> line 1.
Date: Tue, 17 Nov 2009 21:24:34 -0500
To: bug-WWW-Mechanize-FireFox [...] rt.cpan.org
From: Carey Drake <carey [...] frieduck.com>
Corion, I found a small bug in the follow_link method of WMF. Specifically, when it's not called with a link parameter, it produces the error: Can't call method "__click" on an undefined value at ...WWW/Mechanize/FireFox.pm line 844,<DATA> line 1. because of a misplaced "my". Changing: sub follow_link { my ($self,$link,%opts); if (@_ == 2) { # assume only a link parameter ($self,$link) = @_ } else { ($self,%opts) = @_; my $link = $self->find_link_dom(%opts); } $self->synchronize( sub { $link->__click(); }); $self->response } to: sub follow_link { my ($self,$link,%opts); if (@_ == 2) { # assume only a link parameter ($self,$link) = @_ } else { ($self,%opts) = @_; $link = $self->find_link_dom(%opts); } $self->synchronize( sub { $link->__click(); }); $self->response } fixes the problem. Regards, Carey
Subject: Re: [rt.cpan.org #51632] Can't call method "__click" on an undefined value at ...WWW/Mechanize/FireFox.pm line 844, <DATA> line 1.
Date: Thu, 19 Nov 2009 10:46:33 +0100
To: bug-WWW-Mechanize-FireFox [...] rt.cpan.org
From: Max Maischein <corion [...] corion.net>
Hello Carey, Show quoted text
> Corion, > I found a small bug in the follow_link method of WMF. Specifically, when it's not called with a link parameter, it produces the error: > > Can't call method "__click" on an undefined value at ...WWW/Mechanize/FireFox.pm line 844,<DATA> line 1. > > because of a misplaced "my". Changing:
Thanks for the fix! It will go into the next release, due sometime this weekend. -max
Fixed in 0.11