[cgiapp] [Fwd: Re: ValidateRM not PP]
Lyle
webmaster at cosmicperl.com
Fri Jan 23 14:51:22 EST 2009
On Fri, 23 Jan 2009 02:49:24 +0000
Lyle <webmaster at cosmicperl.com> wrote:
> Hi Mark,
> I've only just noticed that ValidateRM has some non Pure Perl
> dependencies:-
> http://deps.cpantesters.org/?module=CGI%3A%3AApplication%3A%3APlugin%3A%3AValidateRM&perl=5.10.0&os=any+OS&pureperl=on
>
> I know from previous conversations that you were aiming for Titanium to
> be Pure Perl (or at least have that option) making it easy to bundle all
> of an apps required modules along with it.
>
> Is there currently a way around this that I'm not aware of?
No, there isn't.
With Data::FormValidator, you can choose not to use the e-mail and data validation options, avoiding the need for those dependencies.
About the test we can do for for HTML::FillInForm is to say "If you want to use
"check_rm", you need to have this installed. I know of no Pure Perl alternative to HTML::FillInForm.
That's essentially the best solution I have so far: Go ahead and bundle
Titanium with it's dependencies, and declare the features that need
XS as optional (which they can be).
I could perhaps, at least distribute the Linux binaries as part of the
distribution, so one platform would have the binaries.
If you want to discuss this further, let's do it on the CGI::App list. It think other people will be interested.
Mark
---
Anyone got input on this?
I've been looking at things. The problem with HTML::Fillinform is that
it uses HTML::Parser that doesn't have a pure perl option. There is
HTML::TagParser which is Pure Perl but it doesn't work anything like the
same way as HTML::Parser, and doesn't seem to have a way of re-creating
the parsed page.
For Data::FormValidator the issue is with Net::DNS (used by
Email::Valid) and Date::Calc.
Net::DNS might have a pure perl option, the XS loader is certainly
wrapped in an eval, but I couldn't quite figure if it'll work without
the c libraries without running some tests. Although if you ask me
Email::Valid seems to go a bit overboard. There are plenty of much
simpler regexp based email validations that would be suitable, and also
a lot less memory consuming.
Date::Calc doesn't have a Pure Perl option, but DateTime does (it and
all it's dependencies have XS or Pure Perl options), so may well be a
good alternative.
At the moment I'm not using fillinform as I'm generating all my input
fields from a data schema file (yml). Although the thought of doing my
own data validation is painful :(
Lyle
More information about the cgiapp
mailing list