Skip to content

Commit

Permalink
fix warnings in Mojo::URL
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 4, 2015
1 parent 175e629 commit 53fc92c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Changes
@@ -1,5 +1,6 @@

5.78 2015-02-04
5.78 2015-02-05
- Fixed warnings in Mojo::URL.

5.77 2015-02-03
- Added content_security_policy method to Mojo::Headers.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/URL.pm
Expand Up @@ -15,7 +15,7 @@ sub authority {

# New authority
if (@_) {
my $authority = shift;
return $self unless defined(my $authority = shift);

# Userinfo
$self->userinfo(_decode(url_unescape $1)) if $authority =~ s/^([^\@]+)\@//;
Expand Down
1 change: 1 addition & 0 deletions t/mojo/url.t
Expand Up @@ -175,6 +175,7 @@ is $url->path, '0', 'right path';
is "$url", 'foo:0', 'right format';

# Relative
is(Mojo::URL->new->to_abs, '', 'no result');
$url = Mojo::URL->new('foo?foo=bar#23');
is $url->path_query, 'foo?foo=bar', 'right path and query';
ok !$url->is_abs, 'is not absolute';
Expand Down

0 comments on commit 53fc92c

Please sign in to comment.