in reply to Tabular monstrosities

Better would be to use the OO interface, as it simplifies things immensely. I would suggest rewriting to that interface and 99% chance the problem will resolve itself. (Rewrites usually resolve niggles, in my experience.)

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

Replies are listed 'Best First'.
Re: Re: Tabular monstrosities
by shotgunefx (Parson) on Mar 31, 2003 at 22:27 UTC
    I would disagree about using the OO form for the html subs. It's gets ugly quick. Though you would need it for form inputs if you have multiple objects (That or local $CGI::Q = $cgi; before the form fields)

    -Lee

    "To be civilized is to deny one's nature."
    Update
    To be honest, I'm suprised this was down-voted. I'm curious what the arguments for this
    print header(), table ({-border=> "0", -width=> "340"}, Tr ({-valign=> "top"}, td ( font ({-face=> "verdana,arial"}, " Column One ", ), "\n", ), "\n", td ( font ({-face=> "verdana,arial"}, " Column Two ", ), "\n", ), "\n", ), "\n", Tr ({-valign=> "top"}, td ( font ({-face=> "verdana,arial"}, " Data ", ), "\n", ), "\n", td ( font ({-face=> "verdana,arial"}, " Data ", ), "\n", ), "\n", ), "\n", ), "\n", ;
    verse this are
    print $cgi->header(), $cgi->table ({-border=> "0", -width=> "340"}, $cgi->Tr ({-valign=> "top"}, $cgi->td ( $cgi->font ({-face=> "verdana,arial"}, " Column One ", ), "\n", ), "\n", $cgi->td ( $cgi->font ({-face=> "verdana,arial"}, " Column Two ", ), "\n", ), "\n", ), "\n", $cgi->Tr ({-valign=> "top"}, $cgi->td ( $cgi->font ({-face=> "verdana,arial"}, " Data ", ), "\n", ), "\n", $cgi->td ( $cgi->font ({-face=> "verdana,arial"}, " Data ", ), "\n", ), "\n", ), "\n", ), "\n", ;
    They are both functionally equivalent for non-form fields, only the first is more shorter and clearer to read. Unless you are subclassing CGI.pm and have special instance specific stuff tied to the HTML generation of non-form fields, why would you use the latter?