Monday, 15 August 2011

cpan - Writing a perl module of the most used util rutines. Are you sitting with a gem function? -



cpan - Writing a perl module of the most used util rutines. Are you sitting with a gem function? -

problem:

i using lot of cpan modules , hard-coded perl functions in many different scripts (a lot of duplicated), , want create code base of operations dry (don't repeat yourself) extracting of mutual code (and maybe refactoring), both own , cpan code mutual module , utilize across scripts, need alter code 1 place when changes occur (they do).

so want inquire whether sitting on functions have implemented during perl career set permanently such mutual module when writing new scripts, need write code specific core functionality of script, , utilize mutual module rest of code.

don't refactor cpan modules. treat these mystery boxes. if there's issue of using multiple cpan modules more or less same work, standardize on one.

i have bunch of local perl modules set in local namespace. example, local::winad access , manipulate our active directory. local namespace never used cpan. it's stored in our version command scheme project, , can checked out , installed on system. can utilize use lib pragma.

if modules, them right. utilize @export_ok , not @export. (or, better, create them object oriented modules). utilize pod documentation , extensive unit testing via test::simple , test::more modules.

pretend you'll submitting them cpan.

and, search cpan create sure you're not duplicating done work. after all, want practice dry includes not redoing work done cpan.

perl cpan

No comments:

Post a Comment