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."