On 06/16/2009 12:17:22 PM, Hans Dieter Pearcey wrote: > If possible, don't show snippets; show your whole component so we can > see > everything in context.
I don't believe that will help at all -- there's too much irrelevent detail, and then there are multiple components within the component. Do you want to read thru my entire app? > You also didn't say exactly what SQL you *did* end up running, just > "nothing" > and "didn't work". Precision would help here. This statement makes *absolutely* no sense to me. Are you asking what flavour of SQL? I do not mention anything about switching it either, so I don't get "what SQL you *did* end up running" is supposed to refer to. > Mason doesn't "fill in" variables in Perl blocks. Perl's normal > string > interpolation does that for your heredocs. Well, not all the examples involved a here doc. Somehow, there are variables in a mason script that are substituted for the HTML output. And they appear to be substituted in the HTML output, but blank in the DBI query. > Also, using $r is a variable is probably a bad idea, since that's the > global > variable that stores the Apache request object. AH! I had forgotten that -- this may have been an issue! Unfortunately I have already started to reorganize the components. I don't think that was the cause, we'll see (thanks Hans) -- but it does maybe explain why I wasn't getting undef, since I later did confirm it the return value was undef (not "nothing"). Here's another bizarre thing: error: Can't call method "execute" on an undefined value at / var/www/html/mason/site.pm line 12. context: ... 8: 9: sub subj_list { 10: my $db = shift; 11: my $sql = $db->prepare("select * from subjects"); 12: return; 13: $sql->execute; This is because the database is empty, so I added a "return if (! defined $sql)". That may be an inappropriate tactic, I'm not sure yet because I'm fluxed here, I changed it to just "return": sub subj_list { my $db = shift; my $sql = $db->prepare("select * from subjects") || die; return; $sql->execute; And it continues to produce the same error. While I'm not an expert with perl, I'm kind of use to my functions "returning" at a "return" statement... __MK ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users