P is for Practical | |
PerlMonks |
Re: Changing Modules in Bad Codeby chunlou (Curate) |
on Jul 10, 2003 at 08:54 UTC ( [id://272919]=note: print w/replies, xml ) | Need Help?? |
For maintainability, a third option, like a combination of your option 1 and 2, is to write a wrapper module (DB::MyDB or something) with methods behaving like the ones being used. That way, if you make backend changes, you modify the implementation of MyDB, not the scripts that use it, as long as the methods' input-output spec stays the same.
In Section
Seekers of Perl Wisdom
|
|