Catalyst::Plugin::Message is a Perl module that contains the great new Catalyst Message Plugin!
SYNOPSIS
# in your controller
use Catalyst qw/Message/;
sub register : Local {
my ( $self, $c ) = @_;
if ( $c->req->method eq 'POST' ){
my $email = $c->req->param('email');
$c->errmsg( email => 'email can not be empty.' ) unless defined $email;
$c->errmsg( email => 'email invalid.' ) unless $email =~ /@/;
if ( not $c->errmsg ){
# save data
}
}
$c->stash->{'template'} = 'register.tpl';
}
# register.tpl
[% errmsg.email %]
Product's homepage
Requirements:
· Perl