html-formhandler
html-formhandler copied to clipboard
HTML::FormHandler::TraitFor::Captcha issues
"Setting both default and builder is not allowed. at /usr/local/lib/perl/5.14.2/Moose/Exporter.pm line 419 Moose::has('+wrapper_class', 'default', 'captcha') called at /usr/local/share/perl/5.14.2/HTML/FormHandler/Field/Captcha.pm line 15
My code:
package SureVoIP::Portal::Form::Auth::Reset;
use strict;
use warnings;
use HTML::FormHandler::Moose;
extends 'HTML::FormHandler';
with 'HTML::FormHandler::TraitFor::Captcha';
with 'HTML::FormHandler::Render::Simple';
has_field 'email' => (
type => 'Email',
label => 'Email',
required => 1,
);
has_field '+captcha' => (
id => 'captcha',
height => '24',
width => '70'
);
no HTML::FormHandler::Moose;
1;
Thanks.
I also encountered.
% cat /usr/ports/www/p5-HTML-FormHandler/files/patch-lib_HTML_FormHandler_Field_Captcha.pm
--- lib/HTML/FormHandler/Field/Captcha.pm.orig 2015-09-17 14:56:43 UTC
+++ lib/HTML/FormHandler/Field/Captcha.pm
@@ -12,7 +12,8 @@ has 'scramble' => ( isa => 'Int', is =>
has 'lines' => ( isa => 'Int', is => 'rw', default => '2' );
has 'gd_font' => ( isa => 'Str', is => 'rw', default => 'Large' );
has 'image' => ( is => 'rw' );
-has '+wrapper_class' => ( default => 'captcha' );
+# Setting both default and builder is not allowed. at /usr/local/lib/perl5/site_perl/mach/5.20/Moose/Exporter.pm line 419
+#has '+wrapper_class' => ( default => 'captcha' );
has '+widget' => ( default => 'Captcha' );
has '+noupdate' => ( default => 1 );
On 8 Dec 2015 22:34, "Tomohiro Hosaka" [email protected] wrote:
I also encountered.
% cat /usr/ports/www/p5-HTML-FormHandler/files/patch-lib_HTML_FormHandler_Field_Captcha.pm --- lib/HTML/FormHandler/Field/Captcha.pm.orig 2015-09-17 14:56:43 UTC +++ lib/HTML/FormHandler/Field/Captcha.pm @@ -12,7 +12,8 @@ has 'scramble' => ( isa => 'Int', is => has 'lines' => ( isa => 'Int', is => 'rw', default => '2' ); has 'gd_font' => ( isa => 'Str', is => 'rw', default => 'Large' ); has 'image' => ( is => 'rw' ); -has '+wrapper_class' => ( default => 'captcha' ); +# Setting both default and builder is not allowed. at /usr/local/lib/perl5/site_perl/mach/5.20/Moose/Exporter.pm line 419 +#has '+wrapper_class' => ( default => 'captcha' ); has '+widget' => ( default => 'Captcha' );
has '+noupdate' => ( default => 1 );
Thanks for letting me know!
Is this now in the latest version?
Yes.
# pwd
/usr/ports/www/p5-HTML-FormHandler
# cat distinfo
SHA256 (HTML-FormHandler-0.40064.tar.gz) = ae70070ecfd3be1fbcd5198b7b5e76944facc2f151d7980ee8f7f6b33b4378ee
SIZE (HTML-FormHandler-0.40064.tar.gz) = 310478
But, it is private ports tree for myself.