[Catalyst] pratical use of Catalyst::Plugin::Captcha

Adam Herzog adam at herzogdesigns.com
Sat Apr 29 17:35:46 CEST 2006

On 4/29/06, T. H. Lin <easy.lin at gmail.com> wrote:
> It directly return a image data.
> can anyone give a hint?

Make sure to look at the synopsis in the man page. Essentially, in
your controller you're going to want something like this:

sub captcha : Local {
    my ($self, $c) = @_;

And then, in your template/webpage, something like:
<img src="/captcha" />

And that should display the captcha image on the website.

Later, when you are processing the form data, use $c->validate_captcha
to find out if the user entered the correct captcha string.

Hope that helps,

More information about the Catalyst mailing list