Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
better Mojo::Path examples
  • Loading branch information
kraih committed Mar 10, 2013
1 parent e368cfc commit 49a8e86
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/Mojo/Parameters.pm
Expand Up @@ -188,6 +188,8 @@ sub to_string {

1;

=encoding utf8
=head1 NAME
Mojo::Parameters - Parameters
Expand All @@ -202,6 +204,7 @@ Mojo::Parameters - Parameters
# Build
my $params = Mojo::Parameters->new(foo => 'bar', baz => 23);
push @$params, i => '♥ mojolicious';
say "$params";
=head1 DESCRIPTION
Expand Down
7 changes: 6 additions & 1 deletion lib/Mojo/Path.pm
Expand Up @@ -145,8 +145,13 @@ Mojo::Path - Path
use Mojo::Path;
# Parse
my $path = Mojo::Path->new('/foo%2Fbar%3B/baz.html');
shift @{$path->parts};
say $path->[0];
# Build
my $path = Mojo::Path->new('/i/♥');
push @$path, 'mojolicious';
say "$path";
=head1 DESCRIPTION
Expand Down

0 comments on commit 49a8e86

Please sign in to comment.