Skip to content

Commit

Permalink
use a simpler Mojo::URL example
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Dec 30, 2014
1 parent cb97c26 commit 4cd0088
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/Mojo/URL.pm
Expand Up @@ -205,8 +205,7 @@ Mojo::URL - Uniform Resource Locator
use Mojo::URL;
# Parse
my $url
= Mojo::URL->new('http://sri:foobar@example.com:3000/foo/bar?foo=bar#23');
my $url = Mojo::URL->new('http://sri:foo@example.com:3000/foo?foo=bar#23');
say $url->scheme;
say $url->userinfo;
say $url->host;
Expand All @@ -222,7 +221,7 @@ Mojo::URL - Uniform Resource Locator
$url->host('example.com');
$url->port(3000);
$url->path('/foo/bar');
$url->query->param(foo => 'bar');
$url->query(foo => 'bar');
$url->fragment(23);
say "$url";
Expand Down

0 comments on commit 4cd0088

Please sign in to comment.