Re: Suppressing Embperl warnings?
>
> My problem is that many warnings about redefined subroutines (which I
don't
> care about) get outputted to my terminal window, obscuring the legitimate
> warning and error messages. These messages look like:
>
A call to
HTML::Embperl::Init('/dev/null') ;
at the start of your script should stop the output
Gerald
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is "last" supported in embperl loops?
Hi , > > Does newer versions of embperl support jumping out of a loops like > while .. endwhile , foreach endforeach , something > similar to "next" and "last" keywords in perl. > Yes, starting with 2.0b8 it supports last and next Gerald - Gerald Richterecos electronic communication services gmbh Internetconnect * Webserver/-design/-datenbanken * Consulting Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131 WWW:http://www.ecos.de Fax: +49 6133 925152 - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Form Validate
> > After the form is validated, if it is successful, there are other functions > I would like it to call. For example, I want to disable the "Submit" button > after it is pressed, as to prevent duplicate submissions. Is there a way to > do this using form validate? > Currently you cannot add custom JavaSCript code to the form validation. It's planned for the future. For now you can define your own validation type (see Embperl/Form/Validation/Number.pm for an example) and call your JS code from there. > My form has several confirmation fields. Is there anyway to add logic to > form validate so that it checks to see if two form fields are equal, and if > not, generates an error? > Yes, but you need the CVS version of Embperl. Use the "same" keyword. Here is an example for a password entry: $rules = [-key => 'pass', -name => 'CA Kennwort', required => 1, length_min => 4, -key => 'cpass', -name => 'Kennwort', required => 1, length_min => 4, -key => 'cpass2', -name => 'Kennwortwiederholung', required => 1, length_min => 4, same => 'cpass:Kennwort', ] ; Gerald - Gerald Richterecos electronic communication services gmbh Internetconnect * Webserver/-design/-datenbanken * Consulting Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131 WWW:http://www.ecos.de Fax: +49 6133 925152 - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
question on multipart forms and %fdat
i think this issue was discussed in the past, but i really didn't see a resolution in the mail archives so i might be covering grounds again. still i want to work through this problem with anyone else who encountered it and see what they did to solve it (if at all possible). Here's the issue. Currently i have a form where i'm using the method="post" and enctype="multipart/form-data" part of a form for uploading an image file. when I use post in the form, my %fdat variable produces something like (in going through my error logs): [Mon Jan 6 22:17:49 2003] [warn] [7054]ERR: 32: Warning in Perl code: q : name is "upload" at /home/jadmin/projects/joshi/perl/lib/Handler/Controller.pm line 25. [Mon Jan 6 22:17:49 2003] [warn] [7054]ERR: 32: Warning in Perl code: q : filename is "fl.jpg" Content-Type: image/jpeg ÿØÿà at /home/jadmin/projects/joshi/perl/lib/Handler/Controller.pm line 25. (Note: I'm using a model-view-controller type of design pattern, so I'm passing in %fdat and printing out warning messages in my controller module to examine the contents) Here, upload is supposed to be the key value and I'm assuming that the funky looking characters are the binary file that corresponds to "upload". filename apparently is the name of the file i'm trying to upload. Now, if I remove the method="post" portion in the form, I don't see these warnings, instead seeing the normal key/value pairs from the form (I have a few more fields in my form that I'm using to store information of the file into a database). However, by removing the "post" part, I can't get the form to upload the image file properly, so I assume that the post part is necessary. Anyway, what I'm wondering is how/why having the "post" portion mangles the variables in my form when i use embperl in a multipart type of form. I tried this through a cgi script which wrote the file fine. When I say, do a "use CGI" and attempt to retrieve the form values through my CGI object, my values are still mangled in the embperl page. Also i tried hacking the Embperl.pm module where I attempted to print the contents from the @ffld array into my log file, but the @ffld array was of size 0. Currently, my setup is Apache 1.3.26 on a Redhat 8.0 linux box, using Embperl 1.3.5 and CGI.pm v 2.86, mod perl 1.26 and perl 5.8. i tried varying the embperl version using 1.3.4 and 1.3.1, but the same results occurred there. thanks! -keith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
