in reply to Re^8: CGI Action call
in thread CGI Action call
"I would like to see what is in result using datadumber but don't know how to get it to work"
What did you try and how did it fail? How do I post a question effectively?.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^10: CGI Action call
by tultalk (Monk) on Mar 14, 2018 at 14:09 UTC | |
Looks like sub below doe not generate a hash form the data supplied.
Using the placeholder ? in select I get "1" printed the dumper.log HELP!!! | [reply] [d/l] [select] |
by poj (Abbot) on Mar 14, 2018 at 15:36 UTC | |
In addition to Corion's comments the first line of this sub is incorrect, the scalar $ref will be 1, the count of elements in @_
You are calling $sth->execute() twice, first time with a parameter and again in generateResponseHash($sth) without parameter Breaking long code into subroutines is usually good practice but be careful not to overdo it :) Read more... (2 kB)
poj | [reply] [d/l] [select] |
by tultalk (Monk) on Mar 14, 2018 at 20:34 UTC | |
JSON I cut off all the sub calls after the action updatetable_167 call.
output:
Don;t understand why not in order after $json->canonical(1); | [reply] [d/l] [select] |
by Corion (Patriarch) on Mar 14, 2018 at 20:44 UTC | |
by tultalk (Monk) on Mar 15, 2018 at 08:41 UTC | |
| |
by poj (Abbot) on Mar 14, 2018 at 20:55 UTC | |
by Corion (Patriarch) on Mar 14, 2018 at 14:23 UTC | |
That's not how you initialize a hash reference. Please consider reading tye's References Quick Reference and perlreftut to learn about how to construct references. Also, the output of Dumper( $hash ) should have shown you that what you expect is not what Perl puts into $hash without the surroundings of your CGI script. Consider reducing code you don't understand to a bare minimum instead of testing things inside a CGI program. | [reply] [d/l] [select] |