[Catalyst] Howto Catalyst::Plugin::Captcha ?

th at dix.cz th at dix.cz
Fri May 8 14:40:17 GMT 2009


>> Calling in controller
>> 
>> $c->create_captcha();
>> 
>> imediatelly displays the image. How can be the image passed to TT view?
>
> In your TT template:
> [% c.create_captcha %]

should work?

No. I'v tried it already. The output is mess..

looking to the module the create_captcha method ends:

...snip...

     $c->res->headers->expires( time() );
     $c->res->headers->header( 'Last-Modified' => HTTP::Date::time2str );
     $c->res->headers->header( 'Pragma'        => 'no-cache' );
     $c->res->headers->header( 'Cache-Control' => 'no-cache' );

     $c->res->content_type("image/$mime_type");
     $c->res->output($image_data);
}

Hm, isn't it buggy?

--th



More information about the Catalyst mailing list