I wouldn't recommend naming your run-modes mode1, mode2, mode3, etc. However, that's just my personal preference. I would find it hard to remember what run modes I'm using, and what each run mode's "tag" was without referring to the setup function all the time.
Another thing to look into is using the load_tmpl method already supplied by CGI::Application. It already creates a HTML::Template object. It would also be immediately understable to other CGI::Application users. In addition, you could overrride the default load_tmpl method and have it always define your common parameters, which would save you from having to do it in each run-mode.
For your database section, I would look into Class::DBI or Ima::DBI. These are not strictly required for your present script, but they do move the SQL statements out of your script and into another module. I've had great success with Class::DBI personally.
In reply to Re: CGI::Application Help: General Comments and Authentication Suggestions
by Belgarion
in thread CGI::Application Help: General Comments and Authentication Suggestions
by biosysadmin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |