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: 11454
Status: rejected
Priority: 0/
Queue: WWW-Mechanize

People
Owner: Nobody in particular
Requestors: gabrouze [...] yahoo.com
Cc:
AdminCc:

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



Subject: crash on simple follow_link
Hi, Mechanize crash in my bot when try to follow_link or get a mailto:somebody@somewhere.com Message are : Can't locate object method "host" via package "URI::_generic" (perhaps you forgot to load "URI::_generic"?) at C:/Perl/site/lib/HTTP/Cookies.pm line 725. Can't locate object method "host" via package "URI::mailto" (perhaps you forgot to load "URI::mailto"?) at C:/Perl/site/lib/HTTP/Cookies.pm line 725. thanks in advance
Date: Thu, 10 Feb 2005 09:13:58 -0600
From: Andy Lester <andy [...] petdance.com>
To: Guest via RT <bug-WWW-Mechanize [...] rt.cpan.org>
CC: undisclosed-recipients: ;
Subject: Re: [cpan #11454] crash on simple follow_link
RT-Send-Cc:
On Thu, Feb 10, 2005 at 08:58:06AM -0500, Guest via RT (bug-WWW-Mechanize@rt.cpan.org) wrote: Show quoted text
> Can't locate object method "host" via package "URI::_generic" (perhaps you forgot to load "URI::_generic"?) at C:/Perl/site/lib/HTTP/Cookies.pm line 725. > Can't locate object method "host" via package "URI::mailto" (perhaps you forgot to load "URI::mailto"?) at C:/Perl/site/lib/HTTP/Cookies.pm line 725.
The link it tried to follow is not a valid URL. xoxo, Andy -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance
From: srezic [...] cpan.org
[PETDANCE - Thu Feb 10 10:21:51 2005]: Show quoted text
> On Thu, Feb 10, 2005 at 08:58:06AM -0500, Guest via RT (bug-WWW- > Mechanize@rt.cpan.org) wrote:
> > Can't locate object method "host" via package "URI::_generic"
> (perhaps you forgot to load "URI::_generic"?) at > C:/Perl/site/lib/HTTP/Cookies.pm line 725.
> > Can't locate object method "host" via package "URI::mailto" (perhaps
> you forgot to load "URI::mailto"?) at C:/Perl/site/lib/HTTP/Cookies.pm > line 725. > > The link it tried to follow is not a valid URL. >
I disagree. The above link is an URL, otherwise URI.pm would made a URI::_generic object of it, not a URI::mailto object. But of course it is not clear what should happen if one does not follow a "browseable" link. Maybe the error message should be friendlier, e.g. checking for $uri->can("host") first and warn the user? Regards, Slaven