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


in reply to Using CGI::Ajax and CGI::Application::Plugin::DBH

You should make BUILD_CHART a run mode, All access from the web, whether via Ajax or not, should be via a run mode. BTW, I usually put my dbh connection calls in the cgiapp_init method, because I consider it part of the application initialisation. If you have a base class for all of your controller packages, you can put it in there, and it will be accessible to all of the controller runmode methods, including BUILD_CHART
  • Comment on Re: Using CGI::Ajax and CGI::Application::Plugin::DBH