r32723 - in /branches/upstream/libcatalyst-plugin-formvalidator-perl: ./ current/ current/t/
eloy at users.alioth.debian.org
eloy at users.alioth.debian.org
Tue Apr 7 14:39:49 UTC 2009
Author: eloy
Date: Tue Apr 7 14:39:44 2009
New Revision: 32723
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=32723
Log:
[svn-inject] Installing original source of libcatalyst-plugin-formvalidator-perl
Added:
branches/upstream/libcatalyst-plugin-formvalidator-perl/
branches/upstream/libcatalyst-plugin-formvalidator-perl/current/
branches/upstream/libcatalyst-plugin-formvalidator-perl/current/Changes
branches/upstream/libcatalyst-plugin-formvalidator-perl/current/FormValidator.pm
branches/upstream/libcatalyst-plugin-formvalidator-perl/current/MANIFEST
branches/upstream/libcatalyst-plugin-formvalidator-perl/current/META.yml
branches/upstream/libcatalyst-plugin-formvalidator-perl/current/Makefile.PL
branches/upstream/libcatalyst-plugin-formvalidator-perl/current/README
branches/upstream/libcatalyst-plugin-formvalidator-perl/current/t/
branches/upstream/libcatalyst-plugin-formvalidator-perl/current/t/01use.t
branches/upstream/libcatalyst-plugin-formvalidator-perl/current/t/02pod.t
branches/upstream/libcatalyst-plugin-formvalidator-perl/current/t/03podcoverage.t
Added: branches/upstream/libcatalyst-plugin-formvalidator-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-plugin-formvalidator-perl/current/Changes?rev=32723&op=file
==============================================================================
--- branches/upstream/libcatalyst-plugin-formvalidator-perl/current/Changes (added)
+++ branches/upstream/libcatalyst-plugin-formvalidator-perl/current/Changes Tue Apr 7 14:39:44 2009
@@ -1,0 +1,6 @@
+Revision history for Perl extension Catalyst::Plugin::FormValidator.
+
+0.02 Fri Apr 15 15:00:00 2005
+ - Updated documentation.
+0.01 Fri Jan 28 22:00:00 2005
+ - first release
Added: branches/upstream/libcatalyst-plugin-formvalidator-perl/current/FormValidator.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-plugin-formvalidator-perl/current/FormValidator.pm?rev=32723&op=file
==============================================================================
--- branches/upstream/libcatalyst-plugin-formvalidator-perl/current/FormValidator.pm (added)
+++ branches/upstream/libcatalyst-plugin-formvalidator-perl/current/FormValidator.pm Tue Apr 7 14:39:44 2009
@@ -1,0 +1,82 @@
+package Catalyst::Plugin::FormValidator;
+
+use strict;
+use NEXT;
+use Data::FormValidator;
+
+our $VERSION = '0.02';
+
+=head1 NAME
+
+Catalyst::Plugin::FormValidator - FormValidator for Catalyst
+
+=head1 SYNOPSIS
+
+ use Catalyst 'FormValidator';
+
+ $c->form( optional => ['rest'] );
+ print $c->form->valid('rest');
+
+=head1 DESCRIPTION
+
+This plugin uses L<Data::FormValidator> to validate and set up form data
+from your request parameters. It's a quite thin wrapper around that
+module, so most of the relevant information can be found there.
+
+=head2 EXTENDED METHODS
+
+=head3 prepare
+
+Sets up $c->{form}
+=cut
+
+sub prepare {
+ my $c = shift;
+ $c = $c->NEXT::prepare(@_);
+ $c->{form} = Data::FormValidator->check( $c->request->parameters, {} );
+ return $c;
+}
+
+=head2 METHODS
+
+=head3 form
+
+Merge values with FormValidator.
+
+ $c->form( required => ['yada'] );
+
+Returns a L<Data::FormValidator::Results> object.
+
+ $c->form->valid('rest');
+
+The actual parameters sent to $c->form are the same as used by
+L<Data::FormValidator>'s check function.
+
+=cut
+
+sub form {
+ my $c = shift;
+ if ( $_[0] ) {
+ my $form = $_[1] ? {@_} : $_[0];
+ $c->{form} =
+ Data::FormValidator->check( $c->request->parameters, $form );
+ }
+ return $c->{form};
+}
+
+=head1 SEE ALSO
+
+L<Catalyst>, L<Data::FormValidator>
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri at cpan.org>
+
+=head1 COPYRIGHT
+
+This program is free software, you can redistribute it and/or modify it under
+the same terms as Perl itself.
+
+=cut
+
+1;
Added: branches/upstream/libcatalyst-plugin-formvalidator-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-plugin-formvalidator-perl/current/MANIFEST?rev=32723&op=file
==============================================================================
--- branches/upstream/libcatalyst-plugin-formvalidator-perl/current/MANIFEST (added)
+++ branches/upstream/libcatalyst-plugin-formvalidator-perl/current/MANIFEST Tue Apr 7 14:39:44 2009
@@ -1,0 +1,9 @@
+Changes
+FormValidator.pm
+Makefile.PL
+MANIFEST This list of files
+META.yml
+README
+t/01use.t
+t/02pod.t
+t/03podcoverage.t
Added: branches/upstream/libcatalyst-plugin-formvalidator-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-plugin-formvalidator-perl/current/META.yml?rev=32723&op=file
==============================================================================
--- branches/upstream/libcatalyst-plugin-formvalidator-perl/current/META.yml (added)
+++ branches/upstream/libcatalyst-plugin-formvalidator-perl/current/META.yml Tue Apr 7 14:39:44 2009
@@ -1,0 +1,12 @@
+# http://module-build.sourceforge.net/META-spec.html
+#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
+name: Catalyst-Plugin-FormValidator
+version: 0.02
+version_from: FormValidator.pm
+installdirs: site
+requires:
+ Catalyst: 2.99
+ Data::FormValidator: 0
+
+distribution_type: module
+generated_by: ExtUtils::MakeMaker version 6.17
Added: branches/upstream/libcatalyst-plugin-formvalidator-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-plugin-formvalidator-perl/current/Makefile.PL?rev=32723&op=file
==============================================================================
--- branches/upstream/libcatalyst-plugin-formvalidator-perl/current/Makefile.PL (added)
+++ branches/upstream/libcatalyst-plugin-formvalidator-perl/current/Makefile.PL Tue Apr 7 14:39:44 2009
@@ -1,0 +1,11 @@
+use ExtUtils::MakeMaker;
+
+WriteMakefile(
+ NAME => 'Catalyst::Plugin::FormValidator',
+ AUTHOR => 'Sebastian Riedel (sri at oook.de)',
+ PREREQ_PM => {
+ Catalyst => '2.99',
+ Data::FormValidator => 0
+ },
+ VERSION_FROM => 'FormValidator.pm'
+);
Added: branches/upstream/libcatalyst-plugin-formvalidator-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-plugin-formvalidator-perl/current/README?rev=32723&op=file
==============================================================================
--- branches/upstream/libcatalyst-plugin-formvalidator-perl/current/README (added)
+++ branches/upstream/libcatalyst-plugin-formvalidator-perl/current/README Tue Apr 7 14:39:44 2009
@@ -1,0 +1,34 @@
+NAME
+ Catalyst::Plugin::FormValidator - FormValidator for Catalyst
+
+SYNOPSIS
+ use Catalyst 'FormValidator';
+
+ $c->form( optional => ['rest'] );
+ print $c->form->valid('rest');
+
+DESCRIPTION
+ Data::FormValidator plugin.
+
+ EXTENDED METHODS
+ prepare
+ METHODS
+ form
+ Merge values with FormValidator.
+
+ $c->form( required => ['yada'] );
+
+ Returns a "Data::FormValidator::Results" object.
+
+ $c->form->valid('rest');
+
+SEE ALSO
+ Catalyst, Data::FormValidator
+
+AUTHOR
+ Sebastian Riedel, "sri at cpan.org"
+
+COPYRIGHT
+ This program is free software, you can redistribute it and/or modify it
+ under the same terms as Perl itself.
+
Added: branches/upstream/libcatalyst-plugin-formvalidator-perl/current/t/01use.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-plugin-formvalidator-perl/current/t/01use.t?rev=32723&op=file
==============================================================================
--- branches/upstream/libcatalyst-plugin-formvalidator-perl/current/t/01use.t (added)
+++ branches/upstream/libcatalyst-plugin-formvalidator-perl/current/t/01use.t Tue Apr 7 14:39:44 2009
@@ -1,0 +1,4 @@
+use strict;
+use Test::More tests => 1;
+
+BEGIN { use_ok('Catalyst::Plugin::FormValidator') }
Added: branches/upstream/libcatalyst-plugin-formvalidator-perl/current/t/02pod.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-plugin-formvalidator-perl/current/t/02pod.t?rev=32723&op=file
==============================================================================
--- branches/upstream/libcatalyst-plugin-formvalidator-perl/current/t/02pod.t (added)
+++ branches/upstream/libcatalyst-plugin-formvalidator-perl/current/t/02pod.t Tue Apr 7 14:39:44 2009
@@ -1,0 +1,7 @@
+use Test::More;
+
+eval "use Test::Pod 1.14";
+plan skip_all => 'Test::Pod 1.14 required' if $@;
+plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
+
+all_pod_files_ok();
Added: branches/upstream/libcatalyst-plugin-formvalidator-perl/current/t/03podcoverage.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-plugin-formvalidator-perl/current/t/03podcoverage.t?rev=32723&op=file
==============================================================================
--- branches/upstream/libcatalyst-plugin-formvalidator-perl/current/t/03podcoverage.t (added)
+++ branches/upstream/libcatalyst-plugin-formvalidator-perl/current/t/03podcoverage.t Tue Apr 7 14:39:44 2009
@@ -1,0 +1,7 @@
+use Test::More;
+
+eval "use Test::Pod::Coverage 1.04";
+plan skip_all => 'Test::Pod::Coverage 1.04 required' if $@;
+plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
+
+all_pod_coverage_ok();
More information about the Pkg-perl-cvs-commits
mailing list