On Sun, Apr 23, 2017 at 7:39 PM, iaw4 <[email protected]> wrote:
> is it possible to ask for a hard redirect
What's a hard redirect? 301 / 302? Is this some how different from what
redirect_to() does?
> (with a message flash), similar to how die in the code functions?
I'm not sure what you're asking for here. How does a die() pertain to a
redirect (whether "hard" or "soft")?
> I know I can use the perl die() itself. I can trap deep errors high up in
> the controller with an eval, then execute a flash message with $@, and then
> redirect_to() according to what my death wants.
All that makes sense, so go ahead and do that. :) What are you asking??
:D
A redirect with a flash message:
return $self->flash(message => "My message")->redirect_to('/');
An exception response:
return $self->flash(message => "My message")->reply->exception
<http://mojolicious.org/perldoc/Mojolicious/Plugin/DefaultHelpers#reply-exception>
("Oops");
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.