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


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

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"

  • Comment on Re: Re: Re: Help with my Coding Style - another chance to critique

Replies are listed 'Best First'.
Re: Re: Re: Re: Help with my Coding Style - another chance to critique
by rattusillegitimus (Friar) on Jul 03, 2002 at 05:29 UTC

    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'} );