SilasTheMonk has asked for the wisdom of the Perl Monks concerning the following question:
I have come unstuck trying to debug textarea. I have read all the docs I can think of and done all the searches I can think of. So I know that for debugging a POST action with a textarea I really need to include
This means I get prompted for the parameters. However I really need the textarea to be multiline and when I look at the value returned by the textarea it only ever includes the first line. However when I run it a normal server/browser way all the lines are present. So what am I doing wrong when debugging.use CGI qw(-debug);
Edit: I can produce a simple example. The following script suffices:
If this is called "a.pl" you can then debug it asuse CGI qw(-debug); use strict; use warnings; my $cgi = CGI->new; print $cgi->param('a');
At which point the following happens:perl -d a.pl
Okay I have worked out how to get more than the first line, but the fact that they are separate lines is lost.perl -d a.pl Loading DB routines from perl5db.pl version 1.3 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(a.pl:5): my $cgi = CGI->new; + + DB<1> n (offline mode: enter name=value pairs on standard input; press ^D or ^ +Z when done) a='a b v d' main::(a.pl:6): print $cgi->param('a'); + + DB<1> p $cgi->param('a') a b v d + + DB<2> q
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Debugging textarea
by cmac (Monk) on Dec 05, 2009 at 06:27 UTC | |
by ww (Archbishop) on Dec 05, 2009 at 14:38 UTC | |
by SilasTheMonk (Chaplain) on Dec 05, 2009 at 09:51 UTC | |
|
Re: Debugging textarea
by Anonymous Monk on Dec 05, 2009 at 01:14 UTC |