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

Re: URI Bug?

Thread Previous | Thread Next
From:
merlyn
Date:
November 24, 2002 14:56
Subject:
Re: URI Bug?
Message ID:
86bs4ed1af.fsf@red.stonehenge.com
>>>>> "Gisle" == Gisle Aas <gisle@ActiveState.com> 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
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About