develooper Front page | perl.fwp | Postings from May 2003

Re: Configuration hassles

Thread Previous | Thread Next
From:
=?iso-8859-1?q?Jonathan=20E.=20Paton?=
Date:
May 21, 2003 14:37
Subject:
Re: Configuration hassles
Message ID:
20030521213433.58856.qmail@web41105.mail.yahoo.com
 --- Philippe 'BooK' Bruhat <Philippe.Bruhat@free.fr> wrote:
> Le mercredi 21 mai 2003 à 07:54, Moran, Matthew écrivait:
> > Maybe you'll know of a solution to this.
> > 
> > I've been trying to find out how you edit @INC so you can append the older
> > version stuff at the end of the search path, so that if a module doesn't
> > exist in 5.8.0 it'll at finding it somewhere. The best I've found in the
> > docs is using perl -I /path/to/stuff/ but this doesn't persistently change
> > @INC, and won't work for background stuff unless I go through the whole
> > gamut of scripts Mandrake uses, substituting it in wherever relevant. Which
> > is inelegant at best, and IMHO asking for trouble.
> 
> Here are some of the ways to modify @INC, and how they interact with
> each other...
> 
>     $ PERL5LIB=env1:env2 perl -Iopt1:opt2 -Iopt3 -le 'use lib qw(lib1 lib2); use lib "lib3";
> print for @INC'
>     lib3
...
>     /usr/local/lib/site_perl
>     .
> 
> Your best bet is probably to set PERL5LIB in some .shellrc file.

Or perhaps rename your perl to perl-main, and create the following script:



#!/usr/bin/bash
exec /usr/bin/perl-main -I @extra $@



Run 'chmod +x perl' and name as '/usr/bin/perl'.  This assumes you are
using a Unix machine (which you are... Mandrake is Linux) and have root
access.  Alternatively, recompile perl with it's built-in @INC set
as you please.

Jonathan Paton

NB: I am not very hot at bash scripts, that $@ might need quoted.  Other
tricks might be required... test before use.

=====
#!perl
$J=' 'x25 ;for (qq< 1+10 9+14 5-10 50-9 7+13 2-18 6+13
17+6 02+1 2-10 00+4 00+8 3-13 3+12 01-5 2-10 01+1 03+4
00+4 00+8 1-21 01+1 00+5 01-7 >=~/ \S\S \S\S /gx) {m/(
\d+) (.+) /x,, vec$ J,$p +=$2 ,8,= $c+= +$1} warn $J,,

__________________________________________________
It's Samaritans' Week. Help Samaritans help others. 
Call 08709 000032 to give or donate online now at http://www.samaritans.org/support/donations.shtm

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About