Line # | Revision | Author | |
---|---|---|---|
1 | 3 | ahitrov@rambler.ru | <%ONCE> |
2 | use Contenido::Captcha; | ||
3 | </%ONCE> | ||
4 | |||
5 | <%ARGS> | ||
6 | $cid => undef; | ||
7 | </%ARGS> | ||
8 | |||
9 | <%INIT> | ||
10 | $m->clear_and_abort(404) unless $cid; | ||
11 | |||
12 | my $captcha = Contenido::Captcha->new($keeper); | ||
13 | my $img = $captcha->create_image($cid); | ||
14 | $m->clear_and_abort(404) unless $img; | ||
15 | |||
16 | $r->content_type('image/png'); | ||
17 | return $m->out($$img); | ||
18 | </%INIT> |