Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: Re: Disillusionment

by PodMaster (Abbot)
on Jun 05, 2003 at 05:39 UTC ( #263224=note: print w/replies, xml ) Need Help??

in reply to Re: Disillusionment
in thread Disillusionment

You can't create the start of a table, then add the rows, then close off the table without doing it in one go.. that's just not right.. and definitely not modular.. all too hard for me.<
That's simply not true.
use CGI qw/ *table :standard /; print start_table({-border=>1}); print Tr( td( [qw, a s d f ,])); print end_table; __END__ <table border="1"><tr><td>a</td> <td>s</td> <td>d</td> <td>f</td></tr> +</table>

MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
I run a Win32 PPM repository for perl 5.6x+5.8x. I take requests.
** The Third rule of perl club is a statement of fact: pod is sexy.

Replies are listed 'Best First'.
Re: Re: Re: Disillusionment
by mooseboy (Pilgrim) on Jun 05, 2003 at 13:13 UTC

    Just to add to what the other monks have said on the subject, this is from the docs:

    There will be some times when you want to produce the start and end tags yourself. In this case, you can use the form start_tag_name and end_tag_name, as in:

    print start_h1,'Level 1 Header',end_h1;

    With a few exceptions (described below), start_tag_name and end_tag_name functions are not generated automatically when you use CGI. However, you can specify the tags you want to generate start/end functions for by putting an asterisk in front of their name, or, alternatively, requesting either "start_tag_name" or "end_tag_name" in the import list. Example:

    use CGI qw/:standard *table start_ul/;

    In this example, the following functions are generated in addition to the standard ones:

    start_table() (generates a <TABLE> tag) end_table() (generates a </TABLE> tag) start_ul() (generates a <UL> tag) end_ul() (generates a </UL> tag)

    I haven't tested it with every HTML tag, mind... ;-)

    Update: here's a link to the relevant part of the docs (as suggested by PodMaster).

Re: Re: Re: Disillusionment
by edoc (Chaplain) on Jun 05, 2003 at 07:14 UTC

    Cool! ta!++ that solves b310's problem! 8)



Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://263224]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2021-07-29 00:35 GMT
Find Nodes?
    Voting Booth?

    No recent polls found