Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML::FormHandler::TraitFor::Captcha issues #107

Open
ghenry opened this issue Dec 8, 2015 · 4 comments
Open

HTML::FormHandler::TraitFor::Captcha issues #107

ghenry opened this issue Dec 8, 2015 · 4 comments

Comments

@ghenry
Copy link

ghenry commented Dec 8, 2015

"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.

@bokutin
Copy link
Contributor

bokutin commented Dec 8, 2015

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 );

@ghenry
Copy link
Author

ghenry commented Dec 8, 2015

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!

@ghenry
Copy link
Author

ghenry commented Dec 14, 2015 via email

@bokutin
Copy link
Contributor

bokutin commented Dec 14, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants