Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Suggestions for a web survey frameworkby leocharre (Priest) |
on Oct 16, 2009 at 18:51 UTC ( [id://801624]=note: print w/replies, xml ) | Need Help?? |
Use CGI::Application with CGI::Application::Plugin::Session pseudocode...
And in your cgi-bin/myapp.cgi ...
There's a learning curve. But this is hands down the fastest way to do it, while doing it "right". CGI::Application and plugins do so much work for you that it's just hard to believe such few lines of code do so damn much.. as mentioned, you don't see there instancing of the session object, setting the cookie, retrieving it.. It's done *for* you. It's really very nice. And the code you're using has been tested retested debugged and redebugged by a legion of extremely talented people much wiser than you or I! :-) You can use the session object as is with defaults, or you can tweak it to all heck- timeout, expiry.. etc. Just like you would a CGI::Session object- which is what you get. The plugin manages that object. If you want to learn it as fast as possible, look up the docs to the mentioned modules, read it all top to bottom- and give it a try.
In Section
Seekers of Perl Wisdom
|
|