Skip to content

Instantly share code, notes, and snippets.

@ysasaki
Created March 4, 2010 16:12
Show Gist options
  • Save ysasaki/321836 to your computer and use it in GitHub Desktop.
Save ysasaki/321836 to your computer and use it in GitHub Desktop.
Mojolicious redirect_to_abs
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