On Thu, 2003-06-05 at 23:35, Sam Tregar wrote:
> Some of CGI.pm's routines return lists of strings in list context.
> Subroutine calls like this call to param() are in list context. To
> force the calls to start_form() and end_form() to be in scalar
> context, use the scalar function. For example:
>
> $main_tmpl->param(startform => scalar($q->start_form()));
>
> It's hard to be sure that's the problem, but I'd rate it highly likely.
I think you nailed it on the head. The only place CGI.pm inserts </div>
tag is in end_form:
sub endform {
my($self,@p) = self_or_default(@_);
if ( $NOSTICKY ) {
return wantarray ? ("</form>") : "\n</form>";
} else {
return wantarray ? ("<div>",$self->get_fields,"</div>","</form>") :
"<div>".$self->get_fields ."</div>\n</form>";
}
}
I expect CGI::Apps param sub is getting confused when it gets passed a
list of strings.
I wrapped my calls to $q->end_form() in scalar() and the crash problem
went away. I'm still gonna write all the form tags into the HTML
templates, though.
--[Lance]
--
Carolina Spirit Quest: http://www.carolinaspiritquest.org/
Celebrate The Circle: http://www.angelfire.com/nc/celebratethecircle/
My LiveJournal: http://www.livejournal.com/users/labrown/
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[EMAIL PROTECTED]/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]