Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

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

by crazyinsomniac (Prior)
on Jul 02, 2002 at 07:27 UTC ( [id://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

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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-24 03:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found