Using CPAN

Being the type of Unix administrators (rare, I’m sure) not to use Perl too
often,
I was wondering if someone could tell me something about CPAN. Granted,
it’s a little
off-topic for the list, but I am upgrading from rt 1.x to 2.0…

Is there any way to stop Perl from going out and building the latest
version of Perl
(I’m guessing 5.6.1) every time I want to install something from CPAN? I mean,
I ran the rt/tools/testdeps script to see what I didn’t have installed (it
needs a lot
more stuff than 1.x!), but I’d rather do it by hand. I gave CPAN a try,
though, and off
it runs to download and compile the new version of Perl. Granted, some of
the modules
I’m trying to install may depend on Perl 5.6.1, but I would think this is
somewhat
unlikely.

Am I just doing something wrong?

cheers,

Chris

| Is there any way to stop Perl from going out and building the latest
| version of Perl
| (I’m guessing 5.6.1) every time I want to install something from CPAN? I
±–>8

Not that I’ve found. The folks who run CPAN have apparently decided that
it’s “good” to force people to upgrade.

brandon s. allbery [os/2][linux][solaris][japh] allbery@kf8nh.apk.net
system administrator [WAY too many hats] allbery@ece.cmu.edu
electrical and computer engineering KF8NH
carnegie mellon university [“better check the oblivious first” -ke6sls]

I've rarely had problems with CPAN forcing an install of 5.6 You should be able to prevent it, in most cases.

You can configure CPAN to always prompt you before installing required packages. You need to copy /perl/directory/CPAN/Config.pm to $HOME/.cpan/CPAN/MyConfig.pm. In there you should edit the following line:

‘prerequisites_policy’ => q[follow],

change it to:

‘prerequisites_policy’ => q[ask],

Note, however, that some of the required modules for RT require Data::Dumper. This module has been included in Perl 5.6 and up. So when prompted, if you say ‘yes’ to install data::dumper you will actually be installing perl5.6. So say no to any data::dumper requests. You would be best off downloading it from cpan.org and installing it manually (since data::dumper does not need 5.6) and then start using cpan for the modules required by rt.

Drew

> -----Original Message-----

> From: rt-users-admin@lists.fsck.com

> [mailto:rt-users-admin@lists.fsck.com]On Behalf Of Chris Waltham

> Sent: Friday, June 29, 2001 4:09 AM

> To: rt-users@lists.fsck.com

> Subject: [rt-users] Using CPAN

>

>

> Being the type of Unix administrators (rare, I’m sure) not to use

> Perl too

> often,

> I was wondering if someone could tell me something about CPAN. Granted,

> it’s a little

> off-topic for the list, but I am upgrading from rt 1.x to 2.0…

>

> Is there any way to stop Perl from going out and building the latest

> version of Perl

> (I’m guessing 5.6.1) every time I want to install something from

> CPAN? I mean,

> I ran the rt/tools/testdeps script to see what I didn’t have

> installed (it

> needs a lot

> more stuff than 1.x!), but I’d rather do it by hand. I gave CPAN a try,

> though, and off

> it runs to download and compile the new version of Perl. Granted, some of

> the modules

> I’m trying to install may depend on Perl 5.6.1, but I would

> think this is

> somewhat

> unlikely.

>

> Am I just doing something wrong?

>

> cheers,

>

>

> Chris

>

>

> _______________________________________________

> rt-users mailing list

> rt-users@lists.fsck.com

> http://lists.fsck.com/mailman/listinfo/rt-users

Get your free email from http://mymail.prodigy.net

| ‘prerequisites_policy’ => q[ask],
±–>8

This worked with earlier versions, but is no longer sufficient; CPAN will
still attempt to install Perl 5.6.1 without asking in some cases.

(And Data::Dumper was not involved when it was trying to force this on me.)

brandon s. allbery [os/2][linux][solaris][japh] allbery@kf8nh.apk.net
system administrator [WAY too many hats] allbery@ece.cmu.edu
electrical and computer engineering KF8NH
carnegie mellon university [“better check the oblivious first” -ke6sls]

±—
| Is there any way to stop Perl from going out and building the latest
| version of Perl
| (I’m guessing 5.6.1) every time I want to install something from CPAN? I
±–>8

Not that I’ve found. The folks who run CPAN have apparently decided that
it’s “good” to force people to upgrade.

No, they didn’t. That was a misfeature in earlier releases of CPAN.pm.
If you install the newest version of CPAN.pm by hand, from the tarball
(http://www.cpan.org/authors/id/ANDK/CPAN-1.59_54.tar.gz) you’ll probably
have better luck.

There’s also a setting in the Config.pm for CPAN.pm that lets you set
"follow dependencies" on or off. If you want to have to install every
module with a separate “install ____” command in the shell, you can
turn “follow dependencies” off. That’ll keep the upgrade to 5.6.1 from
happening automatically, but it limits the utility of CPAN.pm somewhat.

srl
Shane Landrum (srl AT boston DOT com) Software Engineer, boston.com

If I remember correctly, I successfully avoided having CPAN build the new
version of Perl by hitting CTRL-C when the Perl install started. It might
have been at the first configuration question, I’m not sure, it was a
while ago.

Todd Mokros
niltsiar@neo.rr.com

Is there any way to stop Perl from going out and building the latest
version of Perl
(I’m guessing 5.6.1) every time I want to install something from CPAN? I mean,

CPAN can be very handy, in that it respolves all dependencies for you
(much in the saem way as FreeBSD’s ports system), but while I like it with
the ports, I’m not too fond of CPAN’s 5.6.1 retrieval in the situation you
mention.

What I do instead of using CPAN is go to:
http://theoryx5.uwinnipeg.ca/mod_perl/cpan-search?request=search

I search for the module I need (Data::Dumper, for instance), click
download, gunzip, untar, perl Makefile.pl, make, make tests, make install,
and that’s it.

Maybe it’s just a control thing, but I prefer to do it that way. :wink:

Patrick

“CW” == Chris Waltham chris@harvestroad.com writes:

CW> Being the type of Unix administrators (rare, I’m sure) not to use
CW> Perl too often, I was wondering if someone could tell me something
CW> about CPAN.

The to make perl not do this, you need the latest CPAN module. Here’s
what I do when I install a machine.

First, run the original cpan:

perl -MCPAN -e shell

now inside the cpan shell, type “install CPAN” followed by “reload
cpan” and then “install Bundle::CPAN”. This will now issue a warning
of outdated modules that are part of perl 5.6.1 rather than upgrade
your perl for you, which is quite antisocial. You can safely install
the other modules now.

You could get smart and run a

perl -MCPAN -e 'shell’
get module::name
exit

then jump into .cpan/build/modulename and run the make yourself ;)-----Original Message-----
From: rt-users-admin@lists.fsck.com
[mailto:rt-users-admin@lists.fsck.com]On Behalf Of Brandon S. Allbery
KF8NH
Sent: Friday, June 29, 2001 4:25 AM
To: John-Andrew Minniti; rt-users@lists.fsck.com
Subject: RE: [rt-users] Using CPAN

On Friday, June 29, 2001 19:17:21 +0800, drew.minniti@prodigy.net wrote:
| ‘prerequisites_policy’ => q[ask],
±–>8

This worked with earlier versions, but is no longer sufficient; CPAN will
still attempt to install Perl 5.6.1 without asking in some cases.

(And Data::Dumper was not involved when it was trying to force this on me.)

brandon s. allbery [os/2][linux][solaris][japh] allbery@kf8nh.apk.net
system administrator [WAY too many hats] allbery@ece.cmu.edu
electrical and computer engineering KF8NH
carnegie mellon university [“better check the oblivious first” -ke6sls]

rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

—BEGIN OFFTOPIC FLAMEBAIT—
You’re not alone.
Personally, I believe that perl isn’t the best tool for many many problems it’s applied to. But it’s trendy apparently…
----END OFFTOPIC FLAMEBAIT----

I’ve had a lot of trouble with cpan, not least because the irish cpan servers appear to be pot luck more than anything else.

In the end, I’ve concluded that it’s just as fast to hand install everything.

CPAN is a bit like socialism, great concept, but inherently flawed, for no obvious reasons other than, well it doesn’t work.

-Feargal.On Fri, 29 Jun 2001 16:09:02 +0800 Chris Waltham chris@harvestroad.com wrote:

Being the type of Unix administrators (rare, I’m sure) not to use Perl too
often,
I was wondering if someone could tell me something about CPAN. Granted,
it’s a little
off-topic for the list, but I am upgrading from rt 1.x to 2.0…

Is there any way to stop Perl from going out and building the latest
version of Perl
(I’m guessing 5.6.1) every time I want to install something from CPAN? I mean,
I ran the rt/tools/testdeps script to see what I didn’t have installed (it
needs a lot
more stuff than 1.x!), but I’d rather do it by hand. I gave CPAN a try,
though, and off
it runs to download and compile the new version of Perl. Granted, some of
the modules
I’m trying to install may depend on Perl 5.6.1, but I would think this is
somewhat
unlikely.

Am I just doing something wrong?

cheers,

Chris


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Feargal Reilly,
Systems Administrator,
The CIA.

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GU d- s+: a-- C++ UB+++ P— L- E— W++ N o-- K w
O M V- PS+ PE- Y+ PGP t 5++ X+ R tv b+++ DI+ D+
G+ e* h r++ y++
------END GEEK CODE BLOCK-----

You can configure CPAN to always prompt you before installing required
packages. You need to copy /perl/directory/CPAN/Config.pm to
$HOME/.cpan/CPAN/MyConfig.pm. In there you should edit the following line:

'prerequisites_policy' => q[follow],

change it to:

'prerequisites_policy' => q[ask],

Note, however, that some of the required modules for RT require
Data::Dumper. This module has been included in Perl 5.6 and up. So when
prompted, if you say ‘yes’ to install data::dumper you will actually be
installing perl5.6. So say no to any data::dumper requests. You would be
best off downloading it from cpan.org and installing it manually and then
start using cpan.

Drew

I just hit CTRL-C also when I saw the CPAN scripts start to download
perl5.6.1, it canceled the download and kept right on getting the rest of
the modules I needed.On Fri, 29 Jun 2001 niltsiar@neo.rr.com wrote:

If I remember correctly, I successfully avoided having CPAN build the new
version of Perl by hitting CTRL-C when the Perl install started. It might
have been at the first configuration question, I’m not sure, it was a
while ago.