Re: bug in URI::URL:url ?

Gisle Aas (aas@bergen.sn.no)
Mon, 30 Sep 1996 08:46:43 +0100


In message <9609291931.AA47620@panther.middlebury.edu>, Otis Gospodnetic writes:
> Hm, I thought I did, I guess I was wrong :)
> Here, from LWP::RobotUA.pm
> 
> In addition these methods are provided:
> 
> =cut
> 
> #
> # Additional attributes in addition to those found in LWP::UserAgent:
> #
> # $self->{'delay'}    Required delay between request to the same
> #                     server in minutes.
> #
> # $self->{'visited'}   An hash where the keys are server names and the
> #                      value is a hash with these values:
> #                          'last'   last fetch time
> #                          'count'  number of documents fetched
> #
> # $self->{'rules'}     A WWW::RobotRules object
> #

You should *not* read the documentation like that.  The POD heading is 
not related to the comment.  Use perldoc() or the installed manual 
pages.

The comment is supposed to be internal implementation documentation 
only.  You should only use the methods which are documented, i.e.  you 
should not know about {visited} at all.  You should use:

   if ($ua->host_count('www.middlebury.edu')) {
      ....
   }

Regards,
Gisle