Skip to content

Commit

Permalink
added a few Mojo::URL examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 22, 2013
1 parent 3b9d574 commit ca2aa4c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Changes
@@ -1,4 +1,6 @@

4.42 2013-09-23

4.41 2013-09-22
- Improved documentation browser to be a little more RESTful.
- Fixed flatten to work with older versions of Perl. (jamadam)
Expand Down
13 changes: 11 additions & 2 deletions lib/Mojo/URL.pm
Expand Up @@ -413,14 +413,23 @@ appended, defaults to a L<Mojo::Parameters> object.
my $abs = $url->to_abs;
my $abs = $url->to_abs(Mojo::URL->new('http://example.com/foo'));
Clone relative URL and turn it into an absolute one.
Clone relative URL and turn it into an absolute one using C<base> or provided
base URL.
# "http://example.com/foo?bar=baz"
Mojo::URL->new('foo?bar=baz')->to_rel(Mojo::URL->new('http://example.com'));
=head2 to_rel
my $rel = $url->to_rel;
my $rel = $url->to_rel(Mojo::URL->new('http://example.com/foo'));
Clone absolute URL and turn it into a relative one.
Clone absolute URL and turn it into a relative one using C<base> or provided
base URL.
# "foo?bar=baz"
Mojo::URL->new('http://example.com/foo?bar=baz')
->to_rel(Mojo::URL->new('http://example.com'));
=head2 to_string
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious.pm
Expand Up @@ -41,7 +41,7 @@ has static => sub { Mojolicious::Static->new };
has types => sub { Mojolicious::Types->new };

our $CODENAME = 'Top Hat';
our $VERSION = '4.41';
our $VERSION = '4.42';

sub AUTOLOAD {
my $self = shift;
Expand Down

0 comments on commit ca2aa4c

Please sign in to comment.