r35082 - in /branches/upstream/libhtml-formfu-perl/current: ./ inc/Module/ inc/Module/Install/ lib/HTML/ lib/HTML/FormFu/ lib/HTML/FormFu/Element/ t/deflators/ t/nested/elements/
ansgar-guest at users.alioth.debian.org
ansgar-guest at users.alioth.debian.org
Sat May 9 14:25:03 UTC 2009
Author: ansgar-guest
Date: Sat May 9 14:24:54 2009
New Revision: 35082
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=35082
Log:
[svn-upgrade] Integrating new upstream version, libhtml-formfu-perl (0.04002)
Added:
branches/upstream/libhtml-formfu-perl/current/t/nested/elements/repeatable_repeatable.t
branches/upstream/libhtml-formfu-perl/current/t/nested/elements/repeatable_repeatable.yml
Modified:
branches/upstream/libhtml-formfu-perl/current/Changes
branches/upstream/libhtml-formfu-perl/current/MANIFEST
branches/upstream/libhtml-formfu-perl/current/META.yml
branches/upstream/libhtml-formfu-perl/current/Makefile.PL
branches/upstream/libhtml-formfu-perl/current/inc/Module/Install.pm
branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Base.pm
branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Can.pm
branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Fetch.pm
branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Makefile.pm
branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Metadata.pm
branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Scripts.pm
branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Share.pm
branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Win32.pm
branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/WriteAll.pm
branches/upstream/libhtml-formfu-perl/current/lib/HTML/FormFu.pm
branches/upstream/libhtml-formfu-perl/current/lib/HTML/FormFu/Element/Repeatable.pm
branches/upstream/libhtml-formfu-perl/current/lib/HTML/FormFu/Element/_Field.pm
branches/upstream/libhtml-formfu-perl/current/lib/HTML/FormFu/ObjectUtil.pm
branches/upstream/libhtml-formfu-perl/current/t/deflators/pathclassfile.t
Modified: branches/upstream/libhtml-formfu-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-formfu-perl/current/Changes?rev=35082&op=diff
==============================================================================
--- branches/upstream/libhtml-formfu-perl/current/Changes (original)
+++ branches/upstream/libhtml-formfu-perl/current/Changes Sat May 9 14:24:54 2009
@@ -1,3 +1,17 @@
+0.04002 2009-05-08
+
+ - Incompatible Change: Element::Repeatable->repeat() now defaults to 1
+ instead of 0. This allows empty Repeatables.
+
+ - Fix test failures on Win32.
+
+ - During Element::Repeatable->process() call children's process() before
+ $self->repeat().
+
+ - Support nested Repeatable elements.
+
+ - Ensure plugins are correctly cloned.
+
0.04001 2009-04-15
- Fix handling of arguments to plugin().
Modified: branches/upstream/libhtml-formfu-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-formfu-perl/current/MANIFEST?rev=35082&op=diff
==============================================================================
--- branches/upstream/libhtml-formfu-perl/current/MANIFEST (original)
+++ branches/upstream/libhtml-formfu-perl/current/MANIFEST Sat May 9 14:24:54 2009
@@ -669,6 +669,8 @@
t/nested/elements/radiogroup.t
t/nested/elements/radiogroup_force_default.t
t/nested/elements/radiogroup_retain_default.t
+t/nested/elements/repeatable_repeatable.t
+t/nested/elements/repeatable_repeatable.yml
t/nested/elements/select.t
t/nested/elements/select_force_default.t
t/nested/elements/select_retain_default.t
Modified: branches/upstream/libhtml-formfu-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-formfu-perl/current/META.yml?rev=35082&op=diff
==============================================================================
--- branches/upstream/libhtml-formfu-perl/current/META.yml (original)
+++ branches/upstream/libhtml-formfu-perl/current/META.yml Sat May 9 14:24:54 2009
@@ -9,7 +9,7 @@
configure_requires:
ExtUtils::MakeMaker: 6.42
distribution_type: module
-generated_by: 'Module::Install version 0.83'
+generated_by: 'Module::Install version 0.87'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -21,6 +21,7 @@
- inc
- share
- t
+ - xt
requires:
Captcha::reCAPTCHA: 0.92
Class::Accessor::Chained::Fast: 0
@@ -28,6 +29,7 @@
Config::Any: 0.10
Crypt::CBC: 0
Crypt::DES: 0
+ Data::Visitor: 0.23
Data::Visitor::Callback: 0
Date::Calc: 0
DateTime: 0.38
@@ -57,4 +59,4 @@
perl: 5.8.1
resources:
license: http://dev.perl.org/licenses/
-version: 0.04001
+version: 0.04002
Modified: branches/upstream/libhtml-formfu-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-formfu-perl/current/Makefile.PL?rev=35082&op=diff
==============================================================================
--- branches/upstream/libhtml-formfu-perl/current/Makefile.PL (original)
+++ branches/upstream/libhtml-formfu-perl/current/Makefile.PL Sat May 9 14:24:54 2009
@@ -15,6 +15,7 @@
requires 'Config::Any' => '0.10'; # supports multi-doc config files
requires 'Crypt::CBC';
requires 'Crypt::DES';
+requires 'Data::Visitor' => 0.23; # get rid of Squirrel warnings
requires 'Data::Visitor::Callback';
requires 'Date::Calc';
requires 'DateTime' => '0.38'; # required for string overloading
Modified: branches/upstream/libhtml-formfu-perl/current/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-formfu-perl/current/inc/Module/Install.pm?rev=35082&op=diff
==============================================================================
--- branches/upstream/libhtml-formfu-perl/current/inc/Module/Install.pm (original)
+++ branches/upstream/libhtml-formfu-perl/current/inc/Module/Install.pm Sat May 9 14:24:54 2009
@@ -28,7 +28,7 @@
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
- $VERSION = '0.83';
+ $VERSION = '0.87';
# Storage for the pseudo-singleton
$MAIN = undef;
Modified: branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Base.pm?rev=35082&op=diff
==============================================================================
--- branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Base.pm (original)
+++ branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Base.pm Sat May 9 14:24:54 2009
@@ -1,7 +1,11 @@
#line 1
package Module::Install::Base;
-$VERSION = '0.83';
+use strict 'vars';
+use vars qw{$VERSION};
+BEGIN {
+ $VERSION = '0.87';
+}
# Suspend handler for "redefined" warnings
BEGIN {
@@ -12,7 +16,7 @@
### This is the ONLY module that shouldn't have strict on
# use strict;
-#line 41
+#line 45
sub new {
my ($class, %args) = @_;
@@ -27,7 +31,7 @@
bless( \%args, $class );
}
-#line 62
+#line 66
sub AUTOLOAD {
my $self = shift;
@@ -38,13 +42,13 @@
goto &$autoload;
}
-#line 79
+#line 83
sub _top {
$_[0]->{_top};
}
-#line 94
+#line 98
sub admin {
$_[0]->_top->{admin}
@@ -52,7 +56,7 @@
Module::Install::Base::FakeAdmin->new;
}
-#line 110
+#line 114
sub is_admin {
$_[0]->admin->VERSION;
@@ -63,6 +67,7 @@
package Module::Install::Base::FakeAdmin;
my $fake;
+
sub new {
$fake ||= bless(\@_, $_[0]);
}
@@ -78,4 +83,4 @@
1;
-#line 157
+#line 162
Modified: branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Can.pm?rev=35082&op=diff
==============================================================================
--- branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Can.pm (original)
+++ branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Can.pm Sat May 9 14:24:54 2009
@@ -9,7 +9,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.83';
+ $VERSION = '0.87';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Fetch.pm?rev=35082&op=diff
==============================================================================
--- branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Fetch.pm (original)
+++ branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Fetch.pm Sat May 9 14:24:54 2009
@@ -6,7 +6,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.83';
+ $VERSION = '0.87';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Makefile.pm?rev=35082&op=diff
==============================================================================
--- branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Makefile.pm (original)
+++ branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Makefile.pm Sat May 9 14:24:54 2009
@@ -7,7 +7,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.83';
+ $VERSION = '0.87';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Metadata.pm?rev=35082&op=diff
==============================================================================
--- branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Metadata.pm (original)
+++ branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Metadata.pm Sat May 9 14:24:54 2009
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.83';
+ $VERSION = '0.87';
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
Modified: branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Scripts.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Scripts.pm?rev=35082&op=diff
==============================================================================
--- branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Scripts.pm (original)
+++ branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Scripts.pm Sat May 9 14:24:54 2009
@@ -6,7 +6,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.83';
+ $VERSION = '0.87';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Share.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Share.pm?rev=35082&op=diff
==============================================================================
--- branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Share.pm (original)
+++ branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Share.pm Sat May 9 14:24:54 2009
@@ -6,7 +6,7 @@
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
- $VERSION = '0.83';
+ $VERSION = '0.87';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
Modified: branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Win32.pm?rev=35082&op=diff
==============================================================================
--- branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Win32.pm (original)
+++ branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/Win32.pm Sat May 9 14:24:54 2009
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.83';
+ $VERSION = '0.87';
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
Modified: branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/WriteAll.pm?rev=35082&op=diff
==============================================================================
--- branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/WriteAll.pm (original)
+++ branches/upstream/libhtml-formfu-perl/current/inc/Module/Install/WriteAll.pm Sat May 9 14:24:54 2009
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.83';
+ $VERSION = '0.87';
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
Modified: branches/upstream/libhtml-formfu-perl/current/lib/HTML/FormFu.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-formfu-perl/current/lib/HTML/FormFu.pm?rev=35082&op=diff
==============================================================================
--- branches/upstream/libhtml-formfu-perl/current/lib/HTML/FormFu.pm (original)
+++ branches/upstream/libhtml-formfu-perl/current/lib/HTML/FormFu.pm Sat May 9 14:24:54 2009
@@ -112,7 +112,7 @@
*plugins = \&plugin;
*add_plugins = \&add_plugin;
-our $VERSION = '0.04001';
+our $VERSION = '0.04002';
$VERSION = eval $VERSION;
Class::C3::initialize();
@@ -3169,7 +3169,7 @@
L<Catalyst::Controller::HTML::FormFu>
-L<DBIx::Class::FormFu>
+L<HTML::FormFu::Model::DBIC>
=head1 AUTHORS
Modified: branches/upstream/libhtml-formfu-perl/current/lib/HTML/FormFu/Element/Repeatable.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-formfu-perl/current/lib/HTML/FormFu/Element/Repeatable.pm?rev=35082&op=diff
==============================================================================
--- branches/upstream/libhtml-formfu-perl/current/lib/HTML/FormFu/Element/Repeatable.pm (original)
+++ branches/upstream/libhtml-formfu-perl/current/lib/HTML/FormFu/Element/Repeatable.pm Sat May 9 14:24:54 2009
@@ -27,10 +27,8 @@
sub repeat {
my ( $self, $count ) = @_;
- $count ||= 1;
-
croak "invalid number to repeat"
- if $count !~ /^[1-9][0-9]*\z/;
+ if $count !~ /^[0-9]+\z/;
my $children;
@@ -50,6 +48,8 @@
$self->_elements( [] );
+ return [] if !$count;
+
my @return;
for my $rep ( 1 .. $count ) {
@@ -66,9 +66,11 @@
for my $field ( @{ $block->get_fields } ) {
if ( defined( my $name = $field->name ) ) {
- $field->original_name($name);
-
- $field->original_nested_name( $field->nested_name );
+ $field->original_name($name)
+ if !defined $field->original_name;
+
+ $field->original_nested_name( $field->nested_name )
+ if !defined $field->original_nested_name;
$field->name("${name}_$rep");
}
Modified: branches/upstream/libhtml-formfu-perl/current/lib/HTML/FormFu/Element/_Field.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-formfu-perl/current/lib/HTML/FormFu/Element/_Field.pm?rev=35082&op=diff
==============================================================================
--- branches/upstream/libhtml-formfu-perl/current/lib/HTML/FormFu/Element/_Field.pm (original)
+++ branches/upstream/libhtml-formfu-perl/current/lib/HTML/FormFu/Element/_Field.pm Sat May 9 14:24:54 2009
@@ -895,7 +895,7 @@
for my $list ( qw(
_filters _constraints _inflators _validators _transformers
- _deflators _errors )
+ _deflators _errors _plugins )
)
{
$clone->$list( [ map { $_->clone } @{ $self->$list } ] );
Modified: branches/upstream/libhtml-formfu-perl/current/lib/HTML/FormFu/ObjectUtil.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-formfu-perl/current/lib/HTML/FormFu/ObjectUtil.pm?rev=35082&op=diff
==============================================================================
--- branches/upstream/libhtml-formfu-perl/current/lib/HTML/FormFu/ObjectUtil.pm (original)
+++ branches/upstream/libhtml-formfu-perl/current/lib/HTML/FormFu/ObjectUtil.pm Sat May 9 14:24:54 2009
@@ -635,6 +635,10 @@
$new{tt_args} = dclone $self->tt_args;
$new{model_config} = dclone $self->model_config;
+ if ( $self->can('_plugins') ) {
+ $new{_plugins} = [ map { $_->clone } @{ $self->_plugins } ];
+ }
+
$new{languages}
= ref $self->languages
? dclone $self->languages
Modified: branches/upstream/libhtml-formfu-perl/current/t/deflators/pathclassfile.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-formfu-perl/current/t/deflators/pathclassfile.t?rev=35082&op=diff
==============================================================================
--- branches/upstream/libhtml-formfu-perl/current/t/deflators/pathclassfile.t (original)
+++ branches/upstream/libhtml-formfu-perl/current/t/deflators/pathclassfile.t Sat May 9 14:24:54 2009
@@ -13,9 +13,6 @@
{ type => "Text", name => "test2", deflator => { type => "PathClassFile", relative => 't'} },
{ type => "Text", name => "test3", deflator => { type => "PathClassFile", absolute => 1} },
{ type => "Text", name => "test4", deflator => { type => "PathClassFile", basename => 1} },
-
-
-
]);
$form->process;
@@ -23,14 +20,15 @@
my $file = Path::Class::File->new('t/deflators/pathclassfile.t');
for (1..4) {
- $form->get_field('test'.$_)->default($file);
+ $form->get_field( "test$_" )->default($file);
}
-my $value = "\Q".$file->relative."\E";
-like($form->get_field('test1'), qr{value="$value"});
-$value = "\Q".$file->relative('t')."\E";
-like($form->get_field('test2'), qr{value="$value"});
-$value = "\Q".$file->absolute."\E";
-like($form->get_field('test3'), qr{value="$value"});
-$value = "\Q".$file->basename."\E";
-like($form->get_field('test4'), qr{value="$value"});
+my $value1 = $file->relative;
+my $value2 = $file->relative('t');
+my $value3 = $file->absolute;
+my $value4 = $file->basename;
+
+like( $form->get_field('test1'), qr{value="\Q$value1\E"} );
+like( $form->get_field('test2'), qr{value="\Q$value2\E"} );
+like( $form->get_field('test3'), qr{value="\Q$value3\E"} );
+like( $form->get_field('test4'), qr{value="\Q$value4\E"}) ;
Added: branches/upstream/libhtml-formfu-perl/current/t/nested/elements/repeatable_repeatable.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-formfu-perl/current/t/nested/elements/repeatable_repeatable.t?rev=35082&op=file
==============================================================================
--- branches/upstream/libhtml-formfu-perl/current/t/nested/elements/repeatable_repeatable.t (added)
+++ branches/upstream/libhtml-formfu-perl/current/t/nested/elements/repeatable_repeatable.t Sat May 9 14:24:54 2009
@@ -1,0 +1,40 @@
+use strict;
+use warnings;
+
+use Test::More tests => 4;
+
+use HTML::FormFu;
+
+my $form = HTML::FormFu->new({ tt_args => { INCLUDE_PATH => 'share/templates/tt/xhtml' } });
+
+$form->load_config_file('t/nested/elements/repeatable_repeatable.yml');
+
+$form->process({
+ 'count' => 1,
+ 'outer.foo_1' => 'aaa',
+ 'outer.count_1' => 1,
+ 'outer.inner.bar_1_1' => 'bbb',
+});
+
+ok( $form->submitted_and_valid );
+
+is_deeply(
+ $form->params,
+ {
+ count => 1,
+ outer => {
+ foo_1 => 'aaa',
+ count_1 => 1,
+ inner => {
+ bar_1_1 => 'bbb',
+ },
+ },
+ }
+);
+
+my $outer = $form->get_element({ type => 'Repeatable' });
+
+my $inner = $outer->get_element->get_element({ type => 'Repeatable' });
+
+is( $outer->get_field->original_name, 'foo' );
+is( $inner->get_field->original_name, 'bar' );
Added: branches/upstream/libhtml-formfu-perl/current/t/nested/elements/repeatable_repeatable.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-formfu-perl/current/t/nested/elements/repeatable_repeatable.yml?rev=35082&op=file
==============================================================================
--- branches/upstream/libhtml-formfu-perl/current/t/nested/elements/repeatable_repeatable.yml (added)
+++ branches/upstream/libhtml-formfu-perl/current/t/nested/elements/repeatable_repeatable.yml Sat May 9 14:24:54 2009
@@ -1,0 +1,20 @@
+---
+elements:
+ - type: Hidden
+ name: count
+
+ - type: Repeatable
+ nested_name: outer
+ counter_name: count
+ elements:
+ - name: foo
+
+ - type: Hidden
+ name: count
+
+ - type: Repeatable
+ nested_name: inner
+ counter_name: 'count'
+
+ elements:
+ - name: bar
More information about the Pkg-perl-cvs-commits
mailing list