Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Shortening long and dirty code

by CukiMnstr (Deacon)
on Sep 04, 2003 at 20:44 UTC ( [id://289016]=note: print w/replies, xml ) Need Help??


in reply to Shortening long and dirty code

maybe you don't want to have your script relying on external modules, but I'm going to mention this anyway: try using a templating system, such as HTML::Template. Your code will be much cleaner, and having your perl code and your html separated is a Good Thing (at least in my book). There are a couple of tutorials here in the monastery that will get you started: this one by jeffa and another one by Ovid.

hope this helps,

Replies are listed 'Best First'.
Re: Re: Shortening long and dirty code
by rob_au (Abbot) on Sep 05, 2003 at 02:19 UTC
    ... and also take a look at CGI::Application for the dispatch mechanism which it provides that would offer a much more discrete and modular separation of execution elements. Even if the CGI::Application is not deployed within the final application, much of the structure and layout of the script provided for review could be better addressed using some of the techniques employed within this module.

    (I have also posted a review on the CGI::Application module previously on this site here).

     

    perl -le "print+unpack'N',pack'B32','00000000000000000000001010000010'"

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-20 12:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found