Baz has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,
I have a script which was working fine until I started getting the following error -
[Sat Sep 11 22:56:17 2004] script.cgi: Can't locate object method "hos +t" via package "URI::_generic" (perhaps you forgot to load "URI::_gen +eric"?) at C:/Perl/site/lib/HTTP/Cookies.pm line 725.
I havent changed my code so perhaps the problem is elsewhere. Anyway, perhaps one of you guys have seen this before
Cheers,
Barry
  • Comment on Error: Can't locate object method "host" via package "URI::_generic"
  • Download Code

Replies are listed 'Best First'.
Re: Error: Can't locate object method "host" via package "URI::_generic"
by dave_the_m (Monsignor) on Sep 11, 2004 at 22:23 UTC
    This usually happens when you pass around malformed URLs, ie one where the http:// prefix is missing or messed up.

    Dave.