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