Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Production level script template

by tomhukins (Curate)
on Sep 07, 2005 at 15:58 UTC ( #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.


Comment on Re: Production level script template
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2015-07-06 00:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (68 votes), past polls