in reply to Style Question: small and modular, or big enough to do the job in one piece?

One method I have used in the past (non OO) is writing all the 'generic' sub routines, and sticking them into a library file, which you then "require".

Once you have coded your subbies in a generic manner, you do all the logic in the main app(s) and call your subbies.

I like to use hashes as the parameters also, eg:

my $retval=&ftp_put_batch(batchname => 'batch001', host=>prod01);

So I guess to answer your question, parameterise, and break it back down to generic functions would be my preferred option. From there you'll have a nice shiny new set of building blocks.. :-)

  • Comment on Re: Style Question: small and modular, or big enough to do the job in one piece?
  • Download Code