| CatalystX-SimpleLogin documentation | Contained in the CatalystX-SimpleLogin distribution. |
CatalystX::SimpleLogin::TraitFor::Controller::Login::RenderAsTTTemplate
Simple controller role to allow rendering a login form with no template file. Sets the stash 'template' key to a string reference containing the rendered form.
$ctx->stash( template => \$self->render_login_form($ctx, $result) );
See CatalystX::SimpleLogin for authors.
See CatalystX::SimpleLogin for license.
| CatalystX-SimpleLogin documentation | Contained in the CatalystX-SimpleLogin distribution. |
package CatalystX::SimpleLogin::TraitFor::Controller::Login::RenderAsTTTemplate; use MooseX::MethodAttributes::Role; use namespace::autoclean; requires qw/ login login_form_stash_key /; after 'login' => sub { my ( $self, $ctx ) = @_; my $rendered_form = $ctx->stash->{$self->login_form_stash_key}->render; $ctx->stash( template => \$rendered_form ); }; 1;