Hi Rajeev,

On Wed, 7 Sep 2011 13:23:44 -0700 (PDT)
Rajeev Prasad <rp.ne...@yahoo.com> wrote:

> how good is: http://search.cpan.org/~zenin/CGI-Validate-2.000/Validate.pm

I never used it.

>  
> which is the best module for validating form data?
>  

Well, I don't know about the best module globally , but at a previous
workplace, we had a bad experience with
http://search.cpan.org/dist/HTML-FormHandler/ (trying to use it in a Catalyst 
application we wrote), and ended up converting
the code to use http://search.cpan.org/dist/HTML-FormFu/ instead. HTML-FormFu
is not too bad from my experience.

> can i have some pointers to some good examples please?

You should be able to find them in HTML-FormFu's distribution as code samples
in the .pod files, as tests in t/**/*.t, or as standalone examples in the
distribution. There are also some in https://github.com/shlomif/catable and in
other Catalyst apps that use FormFu.

Regards,

        Shlomi Fish

>  
>  
> 
> From: Rajeev Prasad <rp.ne...@yahoo.com>
> To: 
> Cc: Perl Beginners <beginners@perl.org>
> Sent: Wednesday, September 7, 2011 11:34 AM
> Subject: Re: form POST string parser
> 
> 
> Uri,
>  
> thx. I like that suggestion, i totally missed that earlier. I will explore 
> cgi module.
>  
>  
> 
> From: Uri Guttman <u...@stemsystems.com>
> To: Rajeev Prasad <rp.ne...@yahoo.com>
> Cc: Perl Beginners <beginners@perl.org>
> Sent: Tuesday, September 6, 2011 7:24 PM
> Subject: Re: form POST string parser
> 
> >>>>> "RP" == Rajeev Prasad <rp.ne...@yahoo.com> writes:
> 
>   RP> hi,
>   RP>  
>   RP> which of the two is better? thx.
>   RP>  
>   RP> $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
>   RP>  
>   RP> or
>   RP> $value =~ s/%(..)/chr(hex($1))/ge;
> 
> both are bad because parsing your own http data is a bad thing. it has
> little gotchas all over. use one of the several modules (CGI.pm and
> others) that do this for you. they do it correctly and cover all the
> little corner cases.
> 
> uri
> 



-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Original Riddles - http://www.shlomifish.org/puzzles/

Tel Aviv, a functional definition: free parking space‐free space.
    — Shachar Shemesh ( http://blog.shemesh.biz/?p=435 )

Please reply to list if it's a mailing list post - http://shlom.in/reply .

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to