Skip to content

Commit

Permalink
documentation tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 8, 2013
1 parent 1fa3ebf commit dcfc6fe
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions lib/Mojo/Path.pm
Expand Up @@ -150,9 +150,7 @@ Mojo::Path - Path
=head1 DESCRIPTION
L<Mojo::Path> is a container for URL paths. Note that C<%2F> will be treated
as C</> for security reasons if the path has to be normalized for an
operation.
L<Mojo::Path> is a container for URL paths.
=head1 ATTRIBUTES
Expand Down Expand Up @@ -216,15 +214,17 @@ Check if path contains given prefix.
my $slash = $path->leading_slash;
$path = $path->leading_slash(1);
Path has a leading slash. Note that this method will normalize the path.
Path has a leading slash. Note that this method will normalize the path and
that C<%2F> will be treated as C</> for security reasons.
=head2 merge
$path = $path->merge('/foo/bar');
$path = $path->merge('foo/bar');
$path = $path->merge(Mojo::Path->new('foo/bar'));
Merge paths. Note that this method will normalize both paths if necessary.
Merge paths. Note that this method will normalize both paths if necessary and
that C<%2F> will be treated as C</> for security reasons.
# "/baz/yada"
Mojo::Path->new('/foo/bar')->merge('/baz/yada');
Expand Down Expand Up @@ -256,7 +256,8 @@ Turn path into an absolute string.
my $parts = $path->parts;
$path = $path->parts([qw(foo bar baz)]);
The path parts. Note that this method will normalize the path.
The path parts. Note that this method will normalize the path and that C<%2F>
will be treated as C</> for security reasons.
# Part with slash
push @{$path->parts}, 'foo/bar';
Expand Down Expand Up @@ -301,7 +302,8 @@ Turn path into a string.
my $slash = $path->trailing_slash;
$path = $path->trailing_slash(1);
Path has a trailing slash. Note that this method will normalize the path.
Path has a trailing slash. Note that this method will normalize the path and
that C<%2F> will be treated as C</> for security reasons.
=head1 SEE ALSO
Expand Down

0 comments on commit dcfc6fe

Please sign in to comment.