Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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

by crazyinsomniac (Prior)
on Jul 02, 2002 at 07:27 UTC ( #178783=note: print w/ replies, xml ) Need Help??


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;"


Comment on Re: Re: Help with my Coding Style - another chance to critique
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'} );

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://178783]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2014-08-29 06:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (275 votes), past polls