Skip to content

Commit

Permalink
fixed Mojo::URL documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Nov 25, 2012
1 parent da5145b commit 9dc12cd
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions lib/Mojo/URL.pm
Expand Up @@ -9,8 +9,8 @@ use Mojo::Parameters;
use Mojo::Path;
use Mojo::Util qw(punycode_decode punycode_encode url_escape url_unescape);

has [qw(fragment host port scheme userinfo)];
has base => sub { Mojo::URL->new };
has [qw(fragment host port scheme userinfo)];

sub new { shift->SUPER::new->parse(@_) }

Expand Down Expand Up @@ -266,13 +266,6 @@ Resource Locators with support for IDNA and IRIs.
L<Mojo::URL> implements the following attributes.
=head2 C<authority>
my $authority = $url->authority;
$url = $url->authority('root:pass%3Bw0rd@localhost:8080');
Authority part of this URL.
=head2 C<base>
my $base = $url->base;
Expand Down Expand Up @@ -301,15 +294,6 @@ Host part of this URL.
Port part of this URL.
=head2 C<protocol>
my $proto = $url->protocol;
Normalized version of C<scheme>.
# "http"
Mojo::URL->new('HtTp://mojolicio.us')->protocol;
=head2 C<scheme>
my $scheme = $url->scheme;
Expand All @@ -336,6 +320,13 @@ following new ones.
Construct a new L<Mojo::URL> object.
=head2 C<authority>
my $authority = $url->authority;
$url = $url->authority('root:pass%3Bw0rd@localhost:8080');
Authority part of this URL.
=head2 C<clone>
my $url2 = $url->clone;
Expand Down Expand Up @@ -383,6 +374,15 @@ defaults to a L<Mojo::Path> object.
# "http://mojolicio.us/perldoc/Mojo/DOM/HTML"
Mojo::URL->new('http://mojolicio.us/perldoc/Mojo/')->path('DOM/HTML');
=head2 C<protocol>
my $proto = $url->protocol;
Normalized version of C<scheme>.
# "http"
Mojo::URL->new('HtTp://mojolicio.us')->protocol;
=head2 C<query>
my $query = $url->query;
Expand Down

0 comments on commit 9dc12cd

Please sign in to comment.