develooper Front page | perl.perl5.porters | Postings from October 1999

RE: PERL_HEADER env varb: was: Addition to @INC

Moore, Paul
October 21, 1999 03:40
RE: PERL_HEADER env varb: was: Addition to @INC
Message ID:
From: Ed Peschko []
> *sigh*. Ok, your point is well taken, but sometimes I 
> *really* wish that there was something like a PERL_HEADER
> variable in which you could put stuff like 
> this, and which would be included at the beginning of each 
> file. Yes, there would be a performance hit, and yes it
> has the potential to make things non-portable, but its
> really beginning to SUCK to have to add six+ lines at 
> the beginning of every file just to get functionality that is 
> so common but also site-specific. Stuff like:

OK, try:

use strict;
use DBI;
use FindBin;           
use lib $FindBin::Bin; 
use IO;
use Data::Dumper;
use Rebol;
use lib "put site specific libraries here"; 

Put this in @INC (probably sitelib), then do

perl -MSite

or even put -MSite in the PERL5OPT variable...

Paul. Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About