in reply to Modules, Frameworks, and Reinventing the Wheel
frivolous module use --
mom and apple pie ++ Seriously, we favor two kinds of modules --versusif (! &valid_foozle_input($wozzle)) {
The former clearly indicates what is going on, the documention on what makes something fozzle_valid can go into the module (sub or object, depending), you can now write unit tests against the sub, you can use the sub in numerous places across the codebase (instead of just in this file, as a local sub would require), not have repeated code, etc.if ($wozzle =~ /extensive-perl-regexp-line-noise-here/ {
just my two cents -- your mileage may vary
water from the great white north
|
|---|