r18823 - in /trunk/libformvalidator-simple-perl: Changes MANIFEST MANIFEST.SKIP META.yml debian/changelog lib/FormValidator/Simple.pm t/16_plugin.t t/lib/MyNamespace/
roberto at users.alioth.debian.org
roberto at users.alioth.debian.org
Sat Apr 19 15:55:34 UTC 2008
Author: roberto
Date: Sat Apr 19 15:55:33 2008
New Revision: 18823
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=18823
Log:
New upstream release.
Added:
trunk/libformvalidator-simple-perl/MANIFEST.SKIP
- copied unchanged from r18822, branches/upstream/libformvalidator-simple-perl/current/MANIFEST.SKIP
trunk/libformvalidator-simple-perl/t/lib/MyNamespace/
- copied from r18822, branches/upstream/libformvalidator-simple-perl/current/t/lib/MyNamespace/
Modified:
trunk/libformvalidator-simple-perl/Changes
trunk/libformvalidator-simple-perl/MANIFEST
trunk/libformvalidator-simple-perl/META.yml
trunk/libformvalidator-simple-perl/debian/changelog
trunk/libformvalidator-simple-perl/lib/FormValidator/Simple.pm
trunk/libformvalidator-simple-perl/t/16_plugin.t
Modified: trunk/libformvalidator-simple-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libformvalidator-simple-perl/Changes?rev=18823&op=diff
==============================================================================
--- trunk/libformvalidator-simple-perl/Changes (original)
+++ trunk/libformvalidator-simple-perl/Changes Sat Apr 19 15:55:33 2008
@@ -1,4 +1,8 @@
Revision history for Perl extension FormValidator::Simple.
+
+0.23 Thr Apr 17 21:17:00 2008
+ - Applied a patch which lets FVS loads plugin easily with +, like Catalyst.
+ Thanks to Jiro Nishiguchi.
0.22 Tue Mar 6 20:07:00 2007
- Applied a patch that lets it work as expected in case *set_messages* is invoked after *check*.
Modified: trunk/libformvalidator-simple-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libformvalidator-simple-perl/MANIFEST?rev=18823&op=diff
==============================================================================
--- trunk/libformvalidator-simple-perl/MANIFEST (original)
+++ trunk/libformvalidator-simple-perl/MANIFEST Sat Apr 19 15:55:33 2008
@@ -25,6 +25,7 @@
lib/FormValidator/Simple/Validator.pm
Makefile.PL
MANIFEST
+MANIFEST.SKIP
META.yml
README
t/00_compile.t
@@ -59,3 +60,4 @@
t/conf/messages.yml
t/conf/messages_ja.yml
t/lib/FormValidator/Simple/Plugin/Sample.pm
+t/lib/MyNamespace/MyPlugin.pm
Modified: trunk/libformvalidator-simple-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libformvalidator-simple-perl/META.yml?rev=18823&op=diff
==============================================================================
--- trunk/libformvalidator-simple-perl/META.yml (original)
+++ trunk/libformvalidator-simple-perl/META.yml Sat Apr 19 15:55:33 2008
@@ -23,4 +23,4 @@
Tie::IxHash: 1.21
UNIVERSAL::require: 0.1
YAML: 0.39
-version: 0.21
+version: 0.23
Modified: trunk/libformvalidator-simple-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libformvalidator-simple-perl/debian/changelog?rev=18823&op=diff
==============================================================================
--- trunk/libformvalidator-simple-perl/debian/changelog (original)
+++ trunk/libformvalidator-simple-perl/debian/changelog Sat Apr 19 15:55:33 2008
@@ -1,3 +1,9 @@
+libformvalidator-simple-perl (0.23-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Roberto C. Sanchez <roberto at connexer.com> Sat, 19 Apr 2008 11:55:17 -0400
+
libformvalidator-simple-perl (0.22-2) unstable; urgency=low
* debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser
Modified: trunk/libformvalidator-simple-perl/lib/FormValidator/Simple.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libformvalidator-simple-perl/lib/FormValidator/Simple.pm?rev=18823&op=diff
==============================================================================
--- trunk/libformvalidator-simple-perl/lib/FormValidator/Simple.pm (original)
+++ trunk/libformvalidator-simple-perl/lib/FormValidator/Simple.pm Sat Apr 19 15:55:33 2008
@@ -12,7 +12,7 @@
use FormValidator::Simple::Constants;
use FormValidator::Simple::Messages;
-our $VERSION = '0.22';
+our $VERSION = '0.23';
__PACKAGE__->mk_classaccessors(qw/data prof results/);
__PACKAGE__->mk_classaccessor( messages => FormValidator::Simple::Messages->new );
@@ -20,7 +20,12 @@
sub import {
my $class = shift;
foreach my $plugin (@_) {
- my $plugin_class = "FormValidator::Simple::Plugin::".$plugin;
+ my $plugin_class;
+ if ($plugin =~ /^\+(.*)/) {
+ $plugin_class = $1;
+ } else {
+ $plugin_class = "FormValidator::Simple::Plugin::$plugin";
+ }
$class->load_plugin($plugin_class);
}
}
@@ -565,6 +570,10 @@
use FormValidator::Simple;
FormValidator::Simple->load_plugin('FormValidator::Simple::Plugin::CreditCard');
+
+If you want to load plugin which name isn't in FormValidator::Simple::Plugin namespace, use +.
+
+ use FormValidator::Simple qw/+MyApp::ValidatorPlugin/;
=head1 MESSAGE HANDLING
Modified: trunk/libformvalidator-simple-perl/t/16_plugin.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libformvalidator-simple-perl/t/16_plugin.t?rev=18823&op=diff
==============================================================================
--- trunk/libformvalidator-simple-perl/t/16_plugin.t (original)
+++ trunk/libformvalidator-simple-perl/t/16_plugin.t Sat Apr 19 15:55:33 2008
@@ -1,22 +1,29 @@
use strict;
-use Test::More tests => 3;
+use Test::More tests => 5;
use CGI;
use lib 't/lib';
BEGIN { require_ok("FormValidator::Simple") }
-FormValidator::Simple->import('Sample');
+FormValidator::Simple->import(qw/Sample +MyNamespace::MyPlugin/);
my $q = CGI->new;
$q->param( sample1 => 'hogehoge' );
$q->param( sample2 => 'sample' );
+$q->param( myplugin1 => 'hogehoge' );
+$q->param( myplugin2 => 'myplugin' );
+
my $r = FormValidator::Simple->check( $q => [
- sample1 => [qw/SAMPLE/],
- sample2 => [qw/SAMPLE/],
+ sample1 => [qw/SAMPLE/],
+ sample2 => [qw/SAMPLE/],
+ myplugin1 => [qw/MYPLUGIN/],
+ myplugin2 => [qw/MYPLUGIN/],
] );
ok($r->invalid('sample1'));
ok(!$r->invalid('sample2'));
+ok($r->invalid('myplugin1'));
+ok(!$r->invalid('myplugin2'));
More information about the Pkg-perl-cvs-commits
mailing list