Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Re: Best way to generate URLs in CGI script?

by bikeNomad (Priest)
on Jul 27, 2001 at 07:31 UTC ( #100222=note: print w/replies, xml ) Need Help??


in reply to Re: Best way to generate URLs in CGI script?
in thread Best way to generate URLs in CGI script?

Thanks...

I wonder about the design of CGI.pm; what good is having the object-oriented interface if it's dealing mostly with global variables anyway? Sure, it doesn't have to export names into main::, but what's the point? The HTML generation stuff doesn't access any object state, so it's pointless as instance methods. The url escaping stuff, likewise. So what really needs to be instance methods? Just things dealing with the current (global) query. So why is the whole mess in a single class?

  • Comment on Re: Re: Best way to generate URLs in CGI script?

Replies are listed 'Best First'.
Re: Re: Re: Best way to generate URLs in CGI script?
by shotgunefx (Parson) on Jul 27, 2001 at 23:48 UTC
    The HTML stuff using object state is very helpful if you want to subclass it.

    Contrived example, but for instance, if you want to keep track of the number of cells in the previous row so you can colspan the current row without hard coding it. (For tables that can change dynamically, you can provide your own Tr Td methods to track this.

    -Lee

    "To be civilized is to deny one's nature."

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2021-05-17 22:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (168 votes). Check out past polls.

    Notices?