[Catalyst] Data::FormValidator Plugin

John Napiorkowski jjn1056 at yahoo.com
Sat Mar 24 16:12:29 GMT 2007



----- Original Message ----
From: Tomohiro Teranishi <tomohiro.teranishi at gmail.com>
To: catalyst at lists.rawmode.org
Sent: Saturday, March 24, 2007 10:33:13 AM
Subject: [Catalyst] Data::FormValidator Plugin

Hi,

I am a big fun of catalyst freamwork  and I made a plugin for
Data::FormValidator called 'C::P::FormValidator::Lazy' . I am
wonderling if this plugin should stay in my local or  publish to CPAN.
 Can I have any suggestion??

I attach source code and also below is  subversion repo url.

http://tomyhero-perl-module.googlecode.com/svn/trunk/Catalyst-Plugin-FormValidator-Lazy/

thanks,

[code snipped]


Hi,

To be honest I think this is the kind of thing that we'd prefer to see done as a actionclass or controller/actionclass rather than as a plugin.  The reasoning is that a plugin becomes global and too many plugins polute the global namespace.  

The best practices that we'd like to promulgate is that a plugin should be something that extends or enhances the catalyst global system, adds functionality to the existing hooks, etc.

Anyway, I think that this was explained better in a draft update to the documentation, I'll peek in the archives and try to point you to it.   But you can look at the way the formbuilder actionclass and controller was made.  This started life as a plugin but was migrated to support the new best practices and now it's probably the most popular form system for catalyst.

--john





 
____________________________________________________________________________________
No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.
http://mobile.yahoo.com/mail 



More information about the Catalyst mailing list