NAME
Mojo::Path - URL Path
SYNOPSIS
use Mojo::Path;
my $path = Mojo::Path->new('/foo/bar%3B/baz.html');
print "$path";
DESCRIPTION
Mojo::Path is a generic container for URL paths.
ATTRIBUTES
leading_slash
my $leading_slash = $path->leading_slash;
$path = $path->leading_slash(1);
parts
my $parts = $path->parts;
$path = $path->parts(qw/foo bar baz/);
trailing_slash
my $trailing_slash = $path->trailing_slash;
$path = $path->trailing_slash(1);
METHODS
Mojo::Path inherits all methods from Mojo::Base and implements the following new ones.
new
my $path = Mojo::Path->new;
my $path = Mojo::Path->new('/foo/bar%3B/baz.html');
append
$path = $path->append(qw/foo bar/);
as_string
my $string = $path->as_string;
clone
my $clone = $path->clone;
parse
$path = $path->parse('/foo/bar%3B/baz.html');
resolve
$path = $path->resolve;