Posted on 2007-02-09 15:55:51-08 by burak in response to 4224
Re: missing something with $captcha->check_code
Hi. You have an error in your code. If you put this after use strict;
BEGIN { use CGI::Carp qw(fatalsToBrowser); }
You can see that your code is die()ing at the line you use check_code(). In your code, $captcha is only defined if $flag ne "submitted". If it has the value "submitted", $captcha will not be defined. Put the $captcha object creation outside of any param check, or create a new one just before calling check_code(). See the SYNOPSIS section of GD::SecurityImage::AC for the usage of the module.
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.