Skip Menu |

This queue is for tickets about the Catalyst-Controller-HTML-FormFu CPAN distribution.

Report information
The Basics
Id: 125102
Status: resolved
Priority: 0/
Queue: Catalyst-Controller-HTML-FormFu

People
Owner: Nobody in particular
Requestors: ppisar [...] redhat.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.02
Fixed in: 2.03-TRIAL



Subject: Tests fail with HTML-FormFu-2.06: Can't locate MooseX/Attribute/FormFuChained.pm
HTML-FormFu-2.06 removed MooseX::Attribute::FormFuChained in favor of external MooseX::Attribute::Chained. That breaks Catalyst-Controller-HTML-FormFu that uses MooseX::Attribute::FormFuChained and tests fail now: t/01basic-formmethod.t ........... ok [error] Caught exception in TestApp::Controller::Token->form "Can't locate MooseX/Attribute/FormFuChained.pm in @INC (you may need to install the MooseX::Attribute::FormFuChained module) (@INC contains: t/lib /builddir/build/BUILD/Catalyst-Controller-HTML-FormFu-2.02/blib/lib /builddir/build/BUILD/Catalyst-Controller-HTML-FormFu-2.02/blib/arch /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at /builddir/build/BUILD/Catalyst-Controller-HTML-FormFu-2.02/blib/lib/HTML/FormFu/Plugin/RequestToken.pm line 8. BEGIN failed--compilation aborted at /builddir/build/BUILD/Catalyst-Controller-HTML-FormFu-2.02/blib/lib/HTML/FormFu/Plugin/RequestToken.pm line 8. Compilation failed in require at /usr/share/perl5/vendor_perl/HTML/FormFu/Util.pm line 390. at /usr/share/perl5/vendor_perl/HTML/FormFu/Role/FormAndElementMethods.pm line 235." # Failed test 'GET http://localhost/token/form' # at t/01basic-token.t line 11. # 500 # Internal Server Error # Failed test 'Found form' # at t/01basic-token.t line 15. Can't call method "find_input" on an undefined value at t/01basic-token.t line 17. # Tests were run but no plan was declared and done_testing() was not seen. # Looks like your test exited with 255 just after 2. t/01basic-token.t ................ Dubious, test returned 255 (wstat 65280, 0xff00) Failed 2/2 subtests
Dne Út 17.dub.2018 09:06:50, ppisar napsal(a): Show quoted text
> HTML-FormFu-2.06 removed MooseX::Attribute::FormFuChained in favor of > external MooseX::Attribute::Chained. That breaks Catalyst-Controller- > HTML-FormFu that uses MooseX::Attribute::FormFuChained and tests fail > now: >
Attached patch against git master HEAD fixes it.
Subject: 0001-Port-to-HTML-FormFu-2.06.patch
From c297432abe8b5f8b321fee7a773223c5a963a34d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> Date: Tue, 17 Apr 2018 15:21:07 +0200 Subject: [PATCH] Port to HTML-FormFu-2.06 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit HTML-FormFu-2.06 removed MooseX::Attribute::FormFuChained in favor of external MooseX::Attribute::Chained. This patch adapts to the change. CPAN RT#125102 Signed-off-by: Petr Písař <ppisar@redhat.com> --- dist.ini | 5 +++-- lib/HTML/FormFu/Element/RequestToken.pm | 12 ++++++------ lib/HTML/FormFu/Plugin/RequestToken.pm | 10 +++++----- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/dist.ini b/dist.ini index beab1c6..0ea42ee 100644 --- a/dist.ini +++ b/dist.ini @@ -9,8 +9,9 @@ Catalyst::Runtime = 5.71001 Catalyst::Component::InstancePerContext = 0 Config::Any = 0 File::Spec = 0 -HTML::FormFu = 2.00 +HTML::FormFu = 2.06 Moose = 1.00 +MooseX::Attribute::Chained = 0 Regexp::Assemble = 0 Scalar::Util = 0 Task::Weaken = 0 ; make sure Scalar::Util has weaken() @@ -65,4 +66,4 @@ allow_dirty = README.pod allow_dirty = Changes commit_msg = v%v%t - %d%n%n%c tag_format = v%v%t ; see Git::Tag -tag_message = v%v%t - %d ; see Git::Tag \ No newline at end of file +tag_message = v%v%t - %d ; see Git::Tag diff --git a/lib/HTML/FormFu/Element/RequestToken.pm b/lib/HTML/FormFu/Element/RequestToken.pm index aefa6ef..79b220c 100644 --- a/lib/HTML/FormFu/Element/RequestToken.pm +++ b/lib/HTML/FormFu/Element/RequestToken.pm @@ -5,18 +5,18 @@ use strict; # VERSION use Moose; -use MooseX::Attribute::FormFuChained; +use MooseX::Attribute::Chained; extends 'HTML::FormFu::Element::Text'; use HTML::FormFu::Util qw( process_attrs ); use Carp qw( croak ); -has expiration_time => ( is => 'rw', traits => ['FormFuChained'], default => 3600 ); -has session_key => ( is => 'rw', traits => ['FormFuChained'], default => '__token' ); -has context => ( is => 'rw', traits => ['FormFuChained'], default => 'context' ); -has limit => ( is => 'rw', traits => ['FormFuChained'], default => 20 ); -has message => ( is => 'rw', traits => ['FormFuChained'], default => 'Form submission failed. Please try again.' ); +has expiration_time => ( is => 'rw', traits => ['Chained'], default => 3600 ); +has session_key => ( is => 'rw', traits => ['Chained'], default => '__token' ); +has context => ( is => 'rw', traits => ['Chained'], default => 'context' ); +has limit => ( is => 'rw', traits => ['Chained'], default => 20 ); +has message => ( is => 'rw', traits => ['Chained'], default => 'Form submission failed. Please try again.' ); after BUILD => sub { my $self = shift; diff --git a/lib/HTML/FormFu/Plugin/RequestToken.pm b/lib/HTML/FormFu/Plugin/RequestToken.pm index 25937a9..0bbef91 100644 --- a/lib/HTML/FormFu/Plugin/RequestToken.pm +++ b/lib/HTML/FormFu/Plugin/RequestToken.pm @@ -5,13 +5,13 @@ use strict; # VERSION use Moose; -use MooseX::Attribute::FormFuChained; +use MooseX::Attribute::Chained; extends 'HTML::FormFu::Plugin'; -has context => ( is => 'rw', traits => ['FormFuChained'] ); -has field_name => ( is => 'rw', traits => ['FormFuChained'] ); -has session_key => ( is => 'rw', traits => ['FormFuChained'] ); -has expiration_time => ( is => 'rw', traits => ['FormFuChained'] ); +has context => ( is => 'rw', traits => ['Chained'] ); +has field_name => ( is => 'rw', traits => ['Chained'] ); +has session_key => ( is => 'rw', traits => ['Chained'] ); +has expiration_time => ( is => 'rw', traits => ['Chained'] ); sub process { my ($self) = @_; -- 2.14.3
Thanks for the report and bug fix. I pushed out a trial release a couple of days ago with that and a set of other fixes that had been sitting around for a while, and have just pushed 2.04 out to CPAN