Perl 5 LWP Design

Roy T. Fielding (fielding@avron.ICS.UCI.EDU)
Sun, 05 Mar 1995 05:22:59 -0800


>> WWW::URL methods:
>> 
>>     new($string);
>>        Creates a new URL object based on the string representation.
>> 
>>     scheme()
>>     host()
>>     port()
>>     path()
>>     query()
>>     fragment()
>>        Set or query parts/attributes of an URL
>> 
>>     str()
>>        Returns a string representation of the URL
>> 
>>     parent($baseUrl)
>>        Make a relative URL into an absoulute URL.  Perhaps a better
>>        name for this method.
> 
> expand? complete? resolve? Does the Internet-Draft give any
> inspiration? :)

I prefer absolute(), though I originally called it  absolutely(;-)

Are you sure that URL should be an object?  That seems like an awful
lot of overhead for a piece of data, and the behaviour is not really
object-like.  Wouldn't a data structure be more appropriate?
I know it would be in C++, but am not sure about perl5.

......Roy Fielding   ICS Grad Student, University of California, Irvine  USA
                                     <fielding@ics.uci.edu>
                     <URL:http://www.ics.uci.edu/dir/grad/Software/fielding>