Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: OOP in CGI

by Tanalis (Curate)
on Jul 29, 2005 at 08:26 UTC ( #479283=note: print w/ replies, xml ) Need Help??


in reply to OOP in CGI

To try and answer your questions ..

As neniro points out, one of the benefits of using the OO interface for the CGI module is the fact that it doesn't cause namespace pollution. For large applications, that's an obvious advantage; for small applications less so.

Other benefits would include the potential to use multiple CGI objects, but why would you want to? Submit buttons can have values to distinguish them, which can be read as parameters if you give your buttons names.

As far as 3 goes, I think you're on your own and stuck with JavaScript. To achieve this, you need the client to perform the submit. As all of your Perl lives server-side, Perl doesn't have the ability to manipulate the client in this way.


Comment on Re: OOP in CGI
Download Code
Re^2: OOP in CGI
by Joost (Canon) on Jul 29, 2005 at 13:01 UTC
    Other benefits would include the potential to use multiple CGI objects, but why would you want to?

    To me, the biggest advantage of using the OO interface is that it's easier to pass the request/response around, and possibly replace the implementation later. Some of the frameworks that run on both mod_perl and CGI do this.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2014-09-18 04:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (108 votes), past polls