Re: a new URI::URL function

Gisle Aas (aas@bergen.sn.no)
11 Apr 1997 06:24:21 +0200


Nicolai Langfeldt <janl@math.uio.no> writes:

> This is like the getsite function of wwwurl in libwww-perl 0.40:
> 
> sub site {
>     my $self = shift;
>     return $self->host.':'.$self->port;
> }
> 
> Handy for those
> 
>   Host: foo:666
> 
> headers and host/port hashes.

The $url->netloc is nearly the same.  Only difference is that it will
not append ":<port>" when it is the default one.  For the host header
this is correct.  Are you sure you need the default port for you
host/port hashes?

-- 
Gisle Aas <aas@sn.no>