> Option 1: Say you have a MyModule with timestamp in it.
> Now a new corporate standard says all company-owned
> modules should be in the Example namespace. All you need
> to do is change the modules themselves (including moving
> them to the Example subdirectory) and the "use"
> statements. The rest of the code will work as-is.
I woke-up at about 3:00am this morning with this particular revelation.
I've been working on a program to parse all my Perl code (more than 1000 programs at last count) to find all the instances of calls to my 'mylib.pl' functions and I was thinking the 'crossing' of all the function names with every line of code was going to be kindof horrendous. Then comes *this* little spark... and all I (might) have to do is change the 'require mylib.pl' to 'use MyModule' (providing the exports, etc are all Ok). I might *still* have to do it... but at least I have a possible shortcut :)
As usual, there's always a few ways to do things... some better than others in terms of documentation, re-use, namespace clashes, etc.
Many thanks, once again, Monks :)
John
In reply to Re: Module Style and Usage
by ozboomer
in thread Module Style and Usage
by ozboomer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |