http://qs321.pair.com?node_id=178783


in reply to Re: Help with my Coding Style - another chance to critique
in thread Help with my Coding Style - another chance to critique

This is unnecessarily repeated, you might consider setting it up in a package global or constant?

I say just use what's there for you, and stick with CGI::Application's param.

 
______crazyinsomniac_____________________________
Of all the things I've lost, I miss my mind the most.
perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"

Replies are listed 'Best First'.
Re: Re: Re: Help with my Coding Style - another chance to critique
by belg4mit (Prior) on Jul 02, 2002 at 17:53 UTC
    Rat is, my point is that several params are being given the same substr. Having this substr be stored in one place would make it easier to update, etc.

    --
    perl -pew "s/\b;([mnst])/'$1/g"

      Good point, belg4mit. I've actually gone one beyond this and, combined with one of crazyinsomniac's suggestions from below, I've made the program quite a bit more customizable. The CGI script now has the following line, allowing me to set both the path top the templates and the main application title:

      my $webapp = AuthorWeb->new( TMPL_PATH => '/path/to/includes/', PARAMS => { apptitle => 'Corwin\'s AuthorWe +b'} );