Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Production level script template

by tomhukins (Curate)
on Sep 07, 2005 at 15:58 UTC ( [id://489908]=note: print w/replies, xml ) Need Help??


in reply to Production level script template

I would deal with quite this differently to you. For example:
  • Write your documentation in POD, not as comments. That way you can run perldoc scriptname to see the purpose, requirements, etc.
  • Put your global variables such as $cmdname and $thread in a singleton object. That means if someone happens to use a local variable called $thread your code won't break.
  • Put all the code in a separate module, or at least a file that you can require. This makes your scripts more readable because you don't have to wade through the common code in each separate script. If you find a bug, you only have to change it once.
  • Consider using modules such as Log::Log4perl and Email::Send to replace your home-grown equivalents. Less code means less bugs.

Log In?
Username:
Password:

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

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

    No recent polls found