Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
more Mojo::URL examples
  • Loading branch information
kraih committed Oct 22, 2011
1 parent 111c858 commit 8c3e610
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Changes
@@ -1,5 +1,8 @@
This file documents the revision history for Perl extension Mojolicious.

2.07 2011-10-23 00:00:00
- Improved documentation.

2.06 2011-10-23 00:00:00
- Improved documentation.

Expand Down
15 changes: 15 additions & 0 deletions lib/Mojo/URL.pm
Expand Up @@ -445,6 +445,12 @@ Parse URL.
Path part of this URL, relative paths will be appended to the existing path,
defaults to a L<Mojo::Path> object.
# "http://mojolicio.us/Mojo/DOM"
say Mojo::URL->new('http://mojolicio.us/perldoc')->path('/Mojo/DOM');
# "http://mojolicio.us/perldoc/Mojo/DOM"
say Mojo::URL->new('http://mojolicio.us/perldoc')->path('Mojo/DOM');
=head2 C<query>
my $query = $url->query;
Expand All @@ -455,6 +461,15 @@ defaults to a L<Mojo::Path> object.
Query part of this URL, defaults to a L<Mojo::Parameters> object.
# "http://mojolicio.us?a=2&c=3"
say Mojo::URL->new('http://mojolicio.us?a=1&b=2')->query(a => 2, c => 3);
# "http://mojolicio.us?a=2&b=2&c=3"
say Mojo::URL->new('http://mojolicio.us?a=1&b=2')->query([a => 2, c => 3]);
# "http://mojolicio.us?a=1&b=2&a=2&c=3"
say Mojo::URL->new('http://mojolicio.us?a=1&b=2')->query({a => 2, c => 3});
=head2 C<to_abs>
my $abs = $url->to_abs;
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious.pm
Expand Up @@ -35,7 +35,7 @@ has static => sub { Mojolicious::Static->new };
has types => sub { Mojolicious::Types->new };

our $CODENAME = 'Leaf Fluttering In Wind';
our $VERSION = '2.06';
our $VERSION = '2.07';

# "These old doomsday devices are dangerously unstable.
# I'll rest easier not knowing where they are."
Expand Down

0 comments on commit 8c3e610

Please sign in to comment.