Created
March 4, 2010 16:12
-
-
Save ysasaki/321836 to your computer and use it in GitHub Desktop.
Mojolicious redirect_to_abs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package MyApp::Controller; | |
use strict; | |
use warnings; | |
use base 'Mojolicious::Controller'; | |
sub redirect_to_abs { | |
my $self = shift; | |
my $url = $self->url_for(@_); | |
return $self->redirect_to($url->to_abs->to_string); | |
} | |
1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment