Codex

URI::WithBase

Section: User Contributed Perl Documentation (3pm)

Updated: 2014-07-13

Index?action=index Return to Main Contents


NAME

URI::WithBase - URIs which remember their base

SYNOPSIS

DESCRIPTION

This module provides the class. Objects of this class are like objects, but can keep their base too. The base represents the context where this URI was found and can be used to absolutize or relativize the URI. All the methods described in URI are supported for objects.
The methods provided in addition to or modified from those of are:
$uri = URI
:WithBase->new($str, [$base]):The constructor takes an optional base URI as the second argument. If provided, this argument initializes the base attribute.:
$uri->base( [$new_base] )
Can be used to get or set the value of the base attribute. The return value, which is the old value, is a URI object or .:
$uri->abs( [$base_uri] )
The argument is now made optional as the object carries its base with it. A new object is returned even if is already absolute (while plain URI objects simply return themselves in that case).:
$uri->rel( [$base_uri] )
The argument is now made optional as the object carries its base with it. A new object is always returned.:

SEE ALSO

URI

COPYRIGHT

Copyright 1998-2002 Gisle Aas.


Index

NAME

SYNOPSIS

DESCRIPTION

SEE ALSO

COPYRIGHT