NAME
Path::Abstract::URI - A URI-like object with Path::Abstract capabilities
SYNOPSIS
my $uri = Path::Abstract::URI->new("http://example.com?a=b")
$uri->down("apple")
# http://example.com/apple?a=b
$uri->query("c=d&e=f")
# http://example.com/apple?c=d&e=f
$uri->path("grape/blueberry/pineapple")
# http://example.com/grape/blueberry/pineapple?c=d&e=f
DESCRIPTION
Path::Abstract::URI is a combination of the URI and Path::Abstract classes. It is essentially a URI class that delegate path-handling methods to Path::Abstract
Unfortunately, this is not true:
Path::Abstract::URI->new( http://example.com )->isa( URI )
Path::Abstract::URI supports the URI generic and common methods
METHODS
Path::Abstract::URI->new( <uri> )
Create a new Path::Abstract::URI object based on <uri>
<uri> should be of the URI class or some sort of URI-like string
Path::Abstract::URI->new( <uri>, path => <path> )
Create a new Path::Abstract::URI object based on <uri> but overriding the path with <path>
Path::Abstract::URI->new("http://example.com/cherry?a=b", path => "grape/lemon")
# http://example.com/grape/lemon?a=b"
Path::Abstract::URI->new( <uri>, child => <child> )
Create a new Path::Abstract::URI object based on <uri> but modifying the path by <child>
Path::Abstract::URI->new("http://example.com/cherry?a=b", child => "grape/lemon")
# http://example.com/cherry/grape/lemon?a=b"
$uri->uri
Returns a URI object that is a copy (not a reference) of the URI object inside $uri
$uri->path
Returns a Path::Abstract object that is a copy (not a reference) of the Path::Abstract object inside $uri
$uri->path( <path> )
Sets the path of $uri, completely overwriting what was there before
The rest of $uri (host, port, scheme, query, ...) does not change
$uri->clone
Returns a Path::Abstract::URI that is an exact clone of $uri
* URI *
See URI for more information
$uri->scheme
$uri->fragment
$uri->as_string
$uri->canonical
$uri->eq
$uri->authority
$uri->query
$uri->query_form
$uri->query_keywords
$uri->userinfo
$uri->host
$uri->port
$uri->host_port
$uri->default_port
$uri->abs
Returns a Path::Abstract::URI object
$uri->rel
Returns a Path::Abstract::URI object
$uri->opaque
$uri->path_query
$uri->path_segments
* Path::Abstract *
See Path::Abstract for more information