It's an interesting question. As far as discussion rather than suggestions goes, on the one hand, CPAN modules are an important part of what makes Perl as flexible and powerful as it is. On the other hand, the range of modules installed does varies according to the distribution. As I've commented before, I've seen distributions of perl that omitted
strict! There's a judgement call to be made for using modules in any perl code implementation, based on a number of criteria, some of which are:
- How much pain does it cause you not to use a non core CPAN module? There are modules that implement functionality you can replicate without too much work, but no one in their right mind will attempt to replicate Net::LDAP or DBI to avoid installing the modules.
- How difficult is it really to install modules on the machines that you're running the code on? Often the reasons are political - absence of a compiler, brutal change control policies written by non-techs etc
- Is the code going to run on varying versions/distributions of perl? Tk is included in Activestate, but not in the core perl source code, and other modules are similarly included in some distributions and not others. You say that Perl is included with your OS, but not what OS it is - if you're working with multiple OS's, the version/distribution of perl installed could vary.
For my part, having suffered in the past with c compiler dependencies, I sometimes accept a speed hit in favour of using pure perl modules or writing the functionality myself, or if a module contains functionality I can easily replicate I may not bother using the module at all. That said, there are some things (Net::LDAP & Data::Dump::Streamer for example) that require c compilers and I simply cannot do without or work around.
I do think that by avoiding using non core modules you are probably making life more difficult than it needs to be - a fairly up to date version of perl will include CPAN.pm, which provided the machine is net connected makes dependency resolution a) easier, and b) automatable, and as 5mi11er said, you can always state what's needed for your code to work.
(and if anyone is thinking I've changed my tune, I have. I'd like to think I've learned something).
--------------------------------------------------------------
$perlquestion=~s/Can I/How do I/g;