Rechercher une page de manuel
Mojo::Path.3pm
Langue: en
Version: 2010-08-12 (fedora - 01/12/10)
Section: 3 (Bibliothèques de fonctions)
Sommaire
NAME
Mojo::Path - PathSYNOPSIS
use Mojo::Path; my $path = Mojo::Path->new('/foo/bar%3B/baz.html'); print "$path";
DESCRIPTION
Mojo::Path is a container for URL paths.ATTRIBUTES
Mojo::Path implements the following attributes.leading_slash
my $leading_slash = $path->leading_slash; $path = $path->leading_slash(1);
Path has a leading slash.
parts
my $parts = $path->parts; $path = $path->parts(qw/foo bar baz/);
The path parts.
trailing_slash
my $trailing_slash = $path->trailing_slash; $path = $path->trailing_slash(1);
Path has a trailing slash.
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');
Construct a new Mojo::Path object.
append
$path = $path->append(qw/foo bar/);
Append parts to path.
canonicalize
$path = $path->canonicalize;
Canonicalize path.
clone
my $clone = $path->clone;
Clone path.
parse
$path = $path->parse('/foo/bar%3B/baz.html');
Parse path.
to_string
my $string = $path->to_string;
Turn path into a string.
SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicious.org>.Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre