develooper Front page | perl.libwww | Postings from November 2002

Re: URI Bug?

Thread Previous | Thread Next
November 24, 2002 14:56
Re: URI Bug?
Message ID:
>>>>> "Gisle" == Gisle Aas <> writes:

>> I'd be happy to learn of a better way to do this, and I'm sure my list
>> is not complete anyway.

Gisle> I suggest either:

Gisle>     $url->host(ip_address($url->host)) if $url->can("host");

Why bother with "can"?  Don't they all inherit from a common base class?
Just put a "host" in the common base class that returns itself.

Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<> <URL:>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See for onsite and open-enrollment Perl training!

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About