Guest User

Untitled

a guest
Jan 22nd, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. my $return = $c->req->uri;
  2. if ( $c->controller->can('redirect_for_action') ) {
  3. my $redir = $c->controller->redirect_for_action( $c->action );
  4. if ( $redir ) {
  5. $return = ref $redir ? $redir->($c) : $redir;
  6. }
  7. }
  8.  
  9. $c->res->redirect($c->uri_for_action('/login', { return => $return }));
Add Comment
Please, Sign In to add comment