[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] Automagic Perl installs and $PATH
Barrie Bremner <baz [at] barriebremner.com> wrote
> I've just run
>
> perl -MCPAN -e 'install Bundle::CPAN'
>
> on my Debian laptop, and it's gone and updated Perl to 5.6.1 as well
> as just the CPAN modules, which isn't too bad, I guess.
That is now considered a bug, and shouldn't happen with future
releases of Perl and CPAN.pm :-)
> How do I get Perl to install using defaults, instead of prompting?
> I've tried answering no to the 'manual config?' questions, but it
> still wants info.
sh Configure -des
accepts all the defaults without question. (See the INSTALL doc for more
info).
> Also, (more Linux-y question), is there a way of specifying which perl
> to use (besides #! /usr/local/bin/perl over /usr/bin/perl in scripts).
>
> If I run perl -v on a Debian box with 5.005 (debian package - part of
> base, can't uninstall (?)) and 5.6.1 (from CPAN, built from source
> ) installed, it's 5.005 that shows it's head.
>
> Does the order of $PATH make a difference?
> Is this fool proof?
The following trick of using the 'env' program as the interpreter does
the job:
#!/usr/bin/env perl -w
use English;
printf "my Perl version is %vd\n", $PERL_VERSION;
Now whatever Perl is first in your $PATH will be used.
Try 'man perlrun' to see more extreme examples of such trickery.
* Dave Mitchell, Senior Technical Consultant
* Fretwell-Downing Informatics Ltd, UK. Dave.Mitchell [at] fdgroup.com
* Tel: +44 114 281 6113. The usual disclaimers....
*
* Standards (n). Battle insignia or tribal totems
print+qq&$}$"$/$s$,$*${$}$g$s$@$.$q$,$:$.$q$^$,$@$*$~$;$.$q$m&if+map{m,^\d{0\,},
,${$::{$'}}=chr($"+=$&||1)}q&10m22,42}6:17*2~2.3 [at] 3;^2$g3q/s"&=~m*\d\*.*g
___________________________________________________________________
Sheffield Linux User's Group - http://www.sheflug.co.uk .
To unsubscribe from this list send mail to
shef-lug-request@list.sheflug.org.uk with the word
"unsubscribe" in the body of the message.
GNU the choice of a complete generation.