targetsmart has asked for the wisdom of the Perl Monks concerning the following question:
for eg, I am using Data::Dumper,strict, warnings, diagnostics, log::agent::logxxx routines, etc., in most of my everyday programs(from small to large), it is possible to ask perl to include these modules/pragmas from a configuration file like perlrc(eg, bashrc for bash), or is there any other way of mimicking this configuration file feature(parser, compiler... setting up some hooks in those modules).
I know that if too much of routines included this way; it will pollute the program namespace, but I believe that I can carefully use it.
Right now I am using perl-support vim plugin for this purpose; as and when I create the file, these 'use' lines will be added automatically based on some predefined templates.( but I want to be more perl-ish)
UPDATE
You could put your desired items in a perl module and then use -M command line option to include them. This would be explicit. It sounds like you're looking for something that's implicit?
Yes I am looking for something implict.
Any idea is greatly appreciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perlrc for perl programs
by moritz (Cardinal) on Feb 06, 2009 at 17:07 UTC | |
|
Re: perlrc for perl programs
by osunderdog (Deacon) on Feb 06, 2009 at 17:23 UTC | |
|
Re: perlrc for perl programs
by mr_mischief (Monsignor) on Feb 06, 2009 at 17:51 UTC |