Skip to content

Commit

Permalink
relaxed Mojo::URL test in url_for
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Aug 18, 2012
1 parent 25be264 commit b6c9cca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Mojolicious/Controller.pm
Expand Up @@ -449,7 +449,8 @@ sub url_for {
my $target = shift // '';

# Absolute URL
return $target if Scalar::Util::blessed($target) ~~ 'Mojo::URL';
return $target
if Scalar::Util::blessed($target) && $target->isa('Mojo::URL');
return Mojo::URL->new($target) if $target =~ m!^\w+\://!;

# Base
Expand Down

0 comments on commit b6c9cca

Please sign in to comment.