NAME
Kelp::Module::FlashMessage
VERSION
version 0.01
SYNOPSIS
First ...
# conf/config.pl
{
modules => ['FlashMessage'],
modules_init => {
'FlashMessage' => {
key => 'flash_custom_key' # optional
},
}
}
Then ...
package MyApp;
use Kelp::Base 'Kelp';
sub some_route {
my $self = shift;
$self->flash_message('my flash message' );
return $self->template('my_template', {
'fmp' => sub { $self->flash_message_present },
'fm' => sub { $self->flash_message }
});
}
And finally, the template (Text::Xslate example):
: if $fmp() {
Message: <: $fm() :>
: }
: if $fmp() {
Message (should you see it? - no!): <: $fm() :>
: }
NAME
Kelp::Module::FlashMessage - flash message support
VERSION
version 0.01
REQUERIMENTS
It needs the Plack::Middleware::Session to work properly. See the adding middleware section in the main Kelp documentation.
REGISTERED METHODS
This module registers two methods into the application:
flash_message
-
get/sets the flash message. When you get the flash message value, it is deleted.
flash_message_present
-
returns a true value if the flash message is present. It may be called many times without clear the message
AUTHOR
Miguel Prz, <niceperl at gmail.com>
BUGS
Please report any bugs or feature requests to bug-sql-template at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=SQL-Template. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Kelp::Module::FlashMessage
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Kelp-Module-FlashMessage
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
To Stefan Geneshky, the creator of great Kelp web framework
COPYRIGHT & LICENSE
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
AUTHOR
Miguel Prz <niceperl@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2013 by Miguel Prz.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.