in reply to CGI::Application Help: General Comments and Authentication Suggestions

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.

  • Comment on Re: CGI::Application Help: General Comments and Authentication Suggestions

Replies are listed 'Best First'.
Re: Re: CGI::Application Help: General Comments and Authentication Suggestions
by BUU (Prior) on May 02, 2004 at 07:32 UTC
Re: Re: CGI::Application Help: General Comments and Authentication Suggestions
by biosysadmin (Deacon) on May 01, 2004 at 18:59 UTC
    Thanks for the input. I'll probably move towards either Class::DBI or Ima::DBI soon, I'm a dinosaur who's been using pure DBI for so long it's always the first thing that pops into my head.

    I'll look into using the load_tmpl method I missed it in my cursory read of the documentation. Also, the mode1, mode2, ... thing I totally stole from the documentation, I'll definitely rename my run_modes more something more reasonable.

    Thanks for the help, I really appreciate it. :)