r3737 - in /packages/libformvalidator-simple-perl/branches/upstream/current: Changes META.yml lib/FormValidator/Simple.pm lib/FormValidator/Simple/Validator.pm t/20_numeric_cmp.t

eloy at users.alioth.debian.org eloy at users.alioth.debian.org
Thu Sep 14 13:16:24 UTC 2006


Author: eloy
Date: Thu Sep 14 13:16:23 2006
New Revision: 3737

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=3737
Log:
Load /tmp/tmp.lnmDK20578/libformvalidator-simple-perl-0.18 into
packages/libformvalidator-simple-perl/branches/upstream/current.

Modified:
    packages/libformvalidator-simple-perl/branches/upstream/current/Changes
    packages/libformvalidator-simple-perl/branches/upstream/current/META.yml
    packages/libformvalidator-simple-perl/branches/upstream/current/lib/FormValidator/Simple.pm
    packages/libformvalidator-simple-perl/branches/upstream/current/lib/FormValidator/Simple/Validator.pm
    packages/libformvalidator-simple-perl/branches/upstream/current/t/20_numeric_cmp.t

Modified: packages/libformvalidator-simple-perl/branches/upstream/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libformvalidator-simple-perl/branches/upstream/current/Changes?rev=3737&op=diff
==============================================================================
--- packages/libformvalidator-simple-perl/branches/upstream/current/Changes (original)
+++ packages/libformvalidator-simple-perl/branches/upstream/current/Changes Thu Sep 14 13:16:23 2006
@@ -1,4 +1,9 @@
 Revision history for Perl extension FormValidator::Simple.
+
+0.18  Tue Sep 12 18:20:00 2006
+    - bugfix:
+        numeric comperison, GREATER_THAN, LESS_THAN, and EQUAL_TO doesn't work
+        as expected when 0 is passed as arguments. Thanks to Ryo Okamoto.
 
 0.17  Tue Sep 05 15:22:00 2006
     - took CLACO's patch that resolves RT issues: 21224, 20658, 19667.

Modified: packages/libformvalidator-simple-perl/branches/upstream/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libformvalidator-simple-perl/branches/upstream/current/META.yml?rev=3737&op=diff
==============================================================================
--- packages/libformvalidator-simple-perl/branches/upstream/current/META.yml (original)
+++ packages/libformvalidator-simple-perl/branches/upstream/current/META.yml Thu Sep 14 13:16:23 2006
@@ -1,7 +1,7 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         FormValidator-Simple
-version:      0.17
+version:      0.18
 version_from: lib/FormValidator/Simple.pm
 installdirs:  site
 requires:

Modified: packages/libformvalidator-simple-perl/branches/upstream/current/lib/FormValidator/Simple.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libformvalidator-simple-perl/branches/upstream/current/lib/FormValidator/Simple.pm?rev=3737&op=diff
==============================================================================
--- packages/libformvalidator-simple-perl/branches/upstream/current/lib/FormValidator/Simple.pm (original)
+++ packages/libformvalidator-simple-perl/branches/upstream/current/lib/FormValidator/Simple.pm Thu Sep 14 13:16:23 2006
@@ -12,7 +12,7 @@
 use FormValidator::Simple::Constants;
 use FormValidator::Simple::Messages;
 
-our $VERSION = '0.17';
+our $VERSION = '0.18';
 
 __PACKAGE__->mk_classaccessors(qw/data prof results/);
 __PACKAGE__->mk_classaccessor( messages => FormValidator::Simple::Messages->new );

Modified: packages/libformvalidator-simple-perl/branches/upstream/current/lib/FormValidator/Simple/Validator.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libformvalidator-simple-perl/branches/upstream/current/lib/FormValidator/Simple/Validator.pm?rev=3737&op=diff
==============================================================================
--- packages/libformvalidator-simple-perl/branches/upstream/current/lib/FormValidator/Simple/Validator.pm (original)
+++ packages/libformvalidator-simple-perl/branches/upstream/current/lib/FormValidator/Simple/Validator.pm Thu Sep 14 13:16:23 2006
@@ -230,7 +230,7 @@
     my ($self, $params, $args) = @_;
     my $data = $params->[0];
     my $target = $args->[0];
-    unless ( $target && $target =~ /^\d+$/ ) {
+    unless ( defined $target && $target =~ /^\d+$/ ) {
         FormValidator::Simple::Exception->throw(
         qq/Validation GREATER_THAN needs a numeric argument./
         );
@@ -243,7 +243,7 @@
     my ($self, $params, $args) = @_;
     my $data = $params->[0];
     my $target = $args->[0];
-    unless ( $target && $target =~ /^\d+$/ ) {
+    unless ( defined $target && $target =~ /^\d+$/ ) {
         FormValidator::Simple::Exception->throw(
         qq/Validation LESS_THAN needs a numeric argument./
         );
@@ -256,7 +256,7 @@
     my ($self, $params, $args) = @_;
     my $data = $params->[0];
     my $target = $args->[0];
-    unless ( $target && $target =~ /^\d+$/ ) {
+    unless ( defined $target && $target =~ /^\d+$/ ) {
         FormValidator::Simple::Exception->throw(
         qq/Validation EQUAL_TO needs a numeric argument./
         );

Modified: packages/libformvalidator-simple-perl/branches/upstream/current/t/20_numeric_cmp.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libformvalidator-simple-perl/branches/upstream/current/t/20_numeric_cmp.t?rev=3737&op=diff
==============================================================================
--- packages/libformvalidator-simple-perl/branches/upstream/current/t/20_numeric_cmp.t (original)
+++ packages/libformvalidator-simple-perl/branches/upstream/current/t/20_numeric_cmp.t Thu Sep 14 13:16:23 2006
@@ -1,5 +1,5 @@
 use strict;
-use Test::More tests => 9;
+use Test::More tests => 12;
 use CGI;
 
 BEGIN{ use_ok("FormValidator::Simple") }
@@ -35,3 +35,13 @@
 ok($r2->invalid('age3'));
 ok($r2->invalid('age4'));
 
+my $r3 = FormValidator::Simple->check( $q => [
+  age1 => [ 'INT', [qw/GREATER_THAN 0/] ],
+  age2 => [ 'INT', [qw/LESS_THAN 0/]    ],
+  age3 => [ 'INT', [qw/EQUAL_TO 0/]     ],
+] );
+
+ok(!$r3->invalid('age1'));
+ok($r3->invalid('age2'));
+ok($r3->invalid('age3'));
+




More information about the Pkg-perl-cvs-commits mailing list