r29223 - in /branches/upstream/libdata-formvalidator-perl/current: ./ lib/Data/ lib/Data/FormValidator/ lib/Data/FormValidator/Constraints/ t/

ansgar-guest at users.alioth.debian.org ansgar-guest at users.alioth.debian.org
Sun Jan 4 12:01:56 UTC 2009


Author: ansgar-guest
Date: Sun Jan  4 12:01:49 2009
New Revision: 29223

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=29223
Log:
[svn-upgrade] Integrating new upstream version, libdata-formvalidator-perl (4.63)

Modified:
    branches/upstream/libdata-formvalidator-perl/current/Changes
    branches/upstream/libdata-formvalidator-perl/current/META.yml
    branches/upstream/libdata-formvalidator-perl/current/README
    branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator.pm
    branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/Constraints.pm
    branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/Constraints/Dates.pm
    branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/Constraints/Upload.pm
    branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/ConstraintsFactory.pm
    branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/Filters.pm
    branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/Results.pm
    branches/upstream/libdata-formvalidator-perl/current/t/dates.t
    branches/upstream/libdata-formvalidator-perl/current/t/dates_closure.t
    branches/upstream/libdata-formvalidator-perl/current/t/untaint.t

Modified: branches/upstream/libdata-formvalidator-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-formvalidator-perl/current/Changes?rev=29223&op=diff
==============================================================================
--- branches/upstream/libdata-formvalidator-perl/current/Changes (original)
+++ branches/upstream/libdata-formvalidator-perl/current/Changes Sun Jan  4 12:01:49 2009
@@ -1,3 +1,20 @@
+
+4.63 Sat Jan  3 12:46:15 EST 2009
+    [DOCUMENTATION]
+    - Improve docs for writing your own constraints (girlwithglasses) 
+
+4.62 Sat Jan  3 12:10:14 EST 2009
+
+    [DOCUMENTATION]
+    - Fix typo in ConstraintsFactory docs (Geraint A. Edwards)
+    - Clarified docs for get_filtered_data (Lisa Hagemann)
+    - Clarify that 'field_filter_regexp_map' can take coderefs as values (Ron Savage)
+
+    [INTERNALS]
+    - Better diagnostics when load_profiles fails (Thoralf Klein)
+    - Improved portability of t/untaint.t (Alexandr Ciornii)
+    - Make some tests conditional on Date::Calc being installed (Frank Wiles)
+
 4.61 Mon Jun 16 14:37:31 EDT 2008
 
     [INTERNALS]

Modified: branches/upstream/libdata-formvalidator-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-formvalidator-perl/current/META.yml?rev=29223&op=diff
==============================================================================
--- branches/upstream/libdata-formvalidator-perl/current/META.yml (original)
+++ branches/upstream/libdata-formvalidator-perl/current/META.yml Sun Jan  4 12:01:49 2009
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name: Data-FormValidator
-version: 4.61
+version: 4.63
 author:
   - Mark Stosberg <mark at summersault.com>
 abstract: |-
@@ -22,26 +22,26 @@
 provides:
   Data::FormValidator:
     file: lib/Data/FormValidator.pm
-    version: 4.61
+    version: 4.63
   Data::FormValidator::Constraints:
     file: lib/Data/FormValidator/Constraints.pm
-    version: 4.6
+    version: 4.63
   Data::FormValidator::Constraints::Dates:
     file: lib/Data/FormValidator/Constraints/Dates.pm
-    version: 4.60
+    version: 4.62
   Data::FormValidator::Constraints::RegexpCommon:
     file: lib/Data/FormValidator/Results.pm
-    version: 4.6
+    version: 4.62
   Data::FormValidator::Constraints::Upload:
     file: lib/Data/FormValidator/Constraints/Upload.pm
-    version: 4.6
+    version: 4.62
   Data::FormValidator::ConstraintsFactory:
     file: lib/Data/FormValidator/ConstraintsFactory.pm
-    version: 1.6
+    version: 1.7
   Data::FormValidator::Filters:
     file: lib/Data/FormValidator/Filters.pm
-    version: 4.6
+    version: 4.62
   Data::FormValidator::Results:
     file: lib/Data/FormValidator/Results.pm
-    version: 4.6
+    version: 4.62
 generated_by: Module::Build version 0.2611

Modified: branches/upstream/libdata-formvalidator-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-formvalidator-perl/current/README?rev=29223&op=diff
==============================================================================
--- branches/upstream/libdata-formvalidator-perl/current/README (original)
+++ branches/upstream/libdata-formvalidator-perl/current/README Sun Jan  4 12:01:49 2009
@@ -340,10 +340,12 @@
          qr/_name$/    => ['ucfirst'],
      },
 
-    This is a hash reference where the keys are the regular expressions to
-    use and the values are references to arrays of filters which will be
-    applied to specific input fields. Used to apply filters to fields that
-    match a regular expression.
+    'field_filter_regexp_map' is used to apply filters to fields that match
+    a regular expression. This is a hash reference where the keys are the
+    regular expressions to use and the values are references to arrays of
+    filters which will be applied to specific input fields. Just as with
+    'field_filters', you can you use a built-in filter or use a coderef to
+    supply your own.
 
   constraint_methods
      use Data::FormValidator::Constraints qw(:closures);

Modified: branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator.pm?rev=29223&op=diff
==============================================================================
--- branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator.pm (original)
+++ branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator.pm Sun Jan  4 12:01:49 2009
@@ -33,7 +33,7 @@
 
 use vars qw( $VERSION $AUTOLOAD @ISA @EXPORT_OK %EXPORT_TAGS );
 
-$VERSION = '4.61';
+$VERSION = '4.63';
 
 require Exporter;
 @ISA = qw(Exporter);
@@ -551,10 +551,11 @@
      qr/_name$/    => ['ucfirst'],
  },
 
-This is a hash reference where the keys are the regular expressions to
-use and the values are references to arrays of filters which will be
-applied to specific input fields. Used to apply filters to fields that
-match a regular expression. 
+'field_filter_regexp_map' is used to apply filters to fields that match a
+regular expression.  This is a hash reference where the keys are the regular
+expressions to use and the values are references to arrays of filters which
+will be applied to specific input fields. Just as with 'field_filters', you
+can you use a built-in filter or use a coderef to supply your own.
 
 =head2 constraint_methods
 
@@ -901,7 +902,7 @@
     return if $self->{profiles} and $self->{profiles_mtime} <= $mtime;
 
     $self->{profiles} = do $file;
-    die "Input profiles didn't return a hash ref\n"
+    die "Input profiles didn't return a hash ref: $@\n"
       unless ref $self->{profiles} eq "HASH";
 
     $self->{profiles_mtime} = $mtime;

Modified: branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/Constraints.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/Constraints.pm?rev=29223&op=diff
==============================================================================
--- branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/Constraints.pm (original)
+++ branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/Constraints.pm Sun Jan  4 12:01:49 2009
@@ -23,7 +23,7 @@
 use strict;
 use vars qw/$AUTOLOAD @ISA @EXPORT_OK %EXPORT_TAGS $VERSION/;
 
-$VERSION = 4.60;
+$VERSION = 4.63;
 
 require Exporter;
 @ISA = qw(Exporter);
@@ -755,9 +755,7 @@
   # In your profile
   constraint_methods => {
     email 			 => email(),
-	prospective_date => coolness(
-		min => 40,
-		max => 60,
+	prospective_date => coolness( 40, 60,
 		{fields => [qw/personality smarts good_looks/]}
 	),
   }
@@ -778,6 +776,7 @@
 		# Name it to refer to in the 'msgs' system.
 		$dfv->name_this('coolness');
 
+        # value of 'prospective_date' parameter
 		my $val = $dfv->get_current_constraint_value();
 
 		# get other data to refer to
@@ -851,7 +850,7 @@
 
  my $data = $self->get_filtered_data;
 
-Returns the filtered data as a hashref, regardless of whether
+Returns the valid filtered data as a hashref, regardless of whether
 it started out as a CGI.pm compatible object. Multiple values are 
 expressed as array references. 
 

Modified: branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/Constraints/Dates.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/Constraints/Dates.pm?rev=29223&op=diff
==============================================================================
--- branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/Constraints/Dates.pm (original)
+++ branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/Constraints/Dates.pm Sun Jan  4 12:01:49 2009
@@ -28,7 +28,7 @@
 	match_date_and_time
 );
 
-$VERSION = '4.60';
+$VERSION = '4.62';
 
 sub date_and_time {
 	my $fmt = shift;

Modified: branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/Constraints/Upload.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/Constraints/Upload.pm?rev=29223&op=diff
==============================================================================
--- branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/Constraints/Upload.pm (original)
+++ branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/Constraints/Upload.pm Sun Jan  4 12:01:49 2009
@@ -28,7 +28,7 @@
 	image_min_dimensions
 );
 
-$VERSION = 4.60;
+$VERSION = 4.62;
 
 sub file_format {
 	my %params = @_;

Modified: branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/ConstraintsFactory.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/ConstraintsFactory.pm?rev=29223&op=diff
==============================================================================
--- branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/ConstraintsFactory.pm (original)
+++ branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/ConstraintsFactory.pm Sun Jan  4 12:01:49 2009
@@ -37,7 +37,7 @@
 		    make_num_set_constraint( -1, ( 1 .. 10 ) ),
 		    make_set_constraint( 1, ( 20 .. 30 ) ),
 		  ),
-	province => make_word_set_constraint( "AB QC ON TN NU" ),
+	province => make_word_set_constraint( 1, "AB QC ON TN NU" ),
 	bid	 => make_range_constraint( 1, 1, 10 ),
     }
 
@@ -48,7 +48,7 @@
 BEGIN {
     require Exporter;
 
-    $VERSION = 1.6; 
+    $VERSION = 1.7; 
 
     @ISA = qw( Exporter );
 

Modified: branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/Filters.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/Filters.pm?rev=29223&op=diff
==============================================================================
--- branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/Filters.pm (original)
+++ branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/Filters.pm Sun Jan  4 12:01:49 2009
@@ -13,7 +13,7 @@
 use strict;
 use vars qw/$AUTOLOAD @ISA @EXPORT_OK %EXPORT_TAGS $VERSION/;
 
-$VERSION = 4.60;
+$VERSION = 4.62;
 
 require Exporter;
 @ISA = qw(Exporter);

Modified: branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/Results.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/Results.pm?rev=29223&op=diff
==============================================================================
--- branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/Results.pm (original)
+++ branches/upstream/libdata-formvalidator-perl/current/lib/Data/FormValidator/Results.pm Sun Jan  4 12:01:49 2009
@@ -24,7 +24,7 @@
   'bool' => \&_bool_overload_based_on_success,
   fallback => 1;
 
-$VERSION = 4.60;
+$VERSION = 4.62;
 
 =pod
 

Modified: branches/upstream/libdata-formvalidator-perl/current/t/dates.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-formvalidator-perl/current/t/dates.t?rev=29223&op=diff
==============================================================================
--- branches/upstream/libdata-formvalidator-perl/current/t/dates.t (original)
+++ branches/upstream/libdata-formvalidator-perl/current/t/dates.t Sun Jan  4 12:01:49 2009
@@ -1,6 +1,17 @@
 #!/usr/bin/perl -w
-use Test::More qw/no_plan/;
-BEGIN { use_ok('Data::FormValidator::Constraints::Dates') };
+use Test::More;
+
+eval { require Date::Calc; };
+
+if( $@ ) {
+    plan skip_all => 'Date::Calc required for date testing';
+}
+else {
+    plan 'no_plan';
+}
+
+require Data::FormValidator::Constraints::Dates;
+
 use strict;
 
 my $format = Data::FormValidator::Constraints::Dates::_prepare_date_format('MM/DD/YYYY hh?:mm:ss pp');

Modified: branches/upstream/libdata-formvalidator-perl/current/t/dates_closure.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-formvalidator-perl/current/t/dates_closure.t?rev=29223&op=diff
==============================================================================
--- branches/upstream/libdata-formvalidator-perl/current/t/dates_closure.t (original)
+++ branches/upstream/libdata-formvalidator-perl/current/t/dates_closure.t Sun Jan  4 12:01:49 2009
@@ -1,8 +1,18 @@
 #!/usr/bin/perl -w
-use Test::More 'no_plan';
-BEGIN { 
-	use_ok('Data::FormValidator::Constraints::Dates') 
-};
+use Test::More;
+
+eval { require Date::Calc; };
+if( $@ ) {
+    plan skip_all => 'Date::Calc required for date testing';
+}
+else {
+    plan 'no_plan';
+}
+
+require Data::FormValidator::Constraints::Dates;
+
+use strict;
+
 use strict;
 
 my $format = Data::FormValidator::Constraints::Dates::_prepare_date_format('MM/DD/YYYY hh?:mm:ss pp');

Modified: branches/upstream/libdata-formvalidator-perl/current/t/untaint.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdata-formvalidator-perl/current/t/untaint.t?rev=29223&op=diff
==============================================================================
--- branches/upstream/libdata-formvalidator-perl/current/t/untaint.t (original)
+++ branches/upstream/libdata-formvalidator-perl/current/t/untaint.t Sun Jan  4 12:01:49 2009
@@ -3,9 +3,11 @@
 $SIG{__WARN__} = \&carp;
 $SIG{__DIE__} = \&confess;
 
+use Config;
+
 my @args = ('-I./lib',
     ( (defined($ENV{PERL5LIB}) && length($ENV{PERL5LIB}))
-        ?(map { "-I$_" } split(/:/, $ENV{PERL5LIB}))
+        ?(map { "-I$_" } split(/$Config{path_sep}/, $ENV{PERL5LIB}))
         : ()
     ),
     '-T',




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