http://www.perlmonks.org?node_id=498807


in reply to User authorization and design of larger web/intranet applications.

cgiapp_prerun() is not the best place to do things such as creating a database connection or initializing most plugins. You'd be better off doing those things in the cgiapp_init() method of your base class. For module-specific configuration, use the setup() method. cgiapp_prerun(), however, is a good place for authen/authz checking.

Speaking of authen/authz, I'm sure you are aware of Cees' excellent CGI::Application::Plugin::Authentication plugin. Authorization has been planned, but as far as I know he is still working on it. Check the CGI::Application mailing lists for more information.

And, of course, you can look for CGI::App help at #cgiapp on irc.perl.org :) (I know you have)

Good luck!
MrCromeDome
  • Comment on Re: User authorization and design of larger web/intranet applications.