Dancer2-Plugin-Growler

 view release on metacpan or  search on metacpan

lib/Dancer2/Plugin/Growler.pm  view on Meta::CPAN

=head1 VERSION

This document describes Dancer2::Plugin::Growler version 0.03

=head1 SYNOPSIS

    use Dancer2::Plugin::Growler;

    …

    my $error = locale->maketext('Invalid login credentials.'); # locale() is from L<Dancer2::Plugin::Locale>
    growl_error($error); 
    redirect '/login';

    …

    my $msg = locale->maketext('Successfully created post the post “[_1]”.', $html_safe_title); # locale() is from L<Dancer2::Plugin::Locale>
    growl_success($msg); 
    redirect "/post/$new_id";

Then in the view’s layout (this example implies a bootstrap3/jquery environment w/ the bootstrapGrowl jquery plugin):



( run in 0.225 second using v1.01-cache-2.11-cpan-4d50c553e7e )