On Tue, Jun 7, 2011 at 2:03 AM, Richard Thomas <[email protected]> wrote:
> Why does it seem with Perl that the likelihood of entering dependency hell > is inversely proportional to the length of the script you want to write? > > I have a 10 liner which requires one simple module. Which requires 3 or 4 > modules from cpan. Which themselves require another dozen modules which then > fail to compile and on the way to sorting those out, it seems I'm missing a > linked library or three that's needed. > > Quicker just to hack things with a regex. And people wonder why "not > invented here" is a phenomenon. > > Rich This is directly related to the fact that your script CAN be so short because it is using so many precoded libraries. If you didn't have these libraries to depend on, your script wouldn't be short. One solution I have often found is to review the Perl Module in question and determine if I should be using it or if I should be using something else or just coding it myself. If you look at the Date::Manip perl module documentation, you will see the following: SHOULD I USE DATE::MANIP If you look in CPAN, you'll find that there are a number of Date and Time packages. Is Date::Manip the one you should be using? In my opinion, the answer is no most of the time. This sounds odd coming from the author of the software, but read on. Date::Manip is written entirely in perl. It's the most powerful of the date modules. It's also the biggest and slowest. --- <snip> --- See the POD file yourself if you want to read the rest. Basically, even the author of the module recommends using a different module most of the time. Andy -- You received this message because you are subscribed to the Google Groups "NLUG" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nlug-talk?hl=en
