PerlByName has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,

I am attempting to replicate a Perl hierarchy using an autobundle (snapshot) file.

To test I have two instances of perl same version (5.14.2) and exact installs (both Configure set the same identical servers and no extra modules). On the first version I install Catalyst and all dependencies via a local CPAN. After which I create a bundle and install via this bundle on the identical Perl using the same local mirror. The trouble is installing the autobundle fails. It may appear that the autobundle requests the install of ?'core'? modules and then requests otehr versions of perl to be installed eg

Running install for module 'vmsish' The most recent version "1.03" of the module "vmsish" is part of the perl-5.15.4 distribution. To install that, you need to +run force install vmsish --or-- install F/FL/FLORA/perl-5.15.4.tar.gz Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible warnings is up to date (1.12). warnings::register is up to date (1.02). Stopping: 'install' failed for 'Bundle::Snapshot_2012_02_21_00'. Failed during this command: DAGOLDEN/Sub-Uplevel-0.22.tar.gz : make_test NO NWCLARK/perl-5.8.6.tar.gz : make NO isa perl RJBS/perl-5.15.2.tar.bz2 : make NO isa perl FLORA/perl-5.15.4.tar.gz : make NO isa perl

On running the cpan command in both cases:

o conf prerequisites_policy follow o conf connect_to_internet_ok 0 and the environment variable PERL_MM_USE_DEFAULT=1

Any idea what the catch is?

Thanks in advance

Stephen

Replies are listed 'Best First'.
Re: Trouble replicating a Perl hierarchy using autobundle
by moritz (Cardinal) on Feb 21, 2012 at 10:44 UTC

    The problem seems to be that the autobundle install tries to install a core module, of which the newest version comes from a development release of perl.

    I have no idea how to fix that though, sorry :-(

Re: Trouble replicating a Perl hierarchy using autobundle
by Anonymous Monk on Feb 21, 2012 at 10:59 UTC

    Hmm, I thought this cpan.pl bug has been fixed, try using cpanp instaed

      Thanks, Bar a few test failures, that seems to have done the trick.
Re: Trouble replicating a Perl hierarchy using autobundle
by Khen1950fx (Canon) on Feb 21, 2012 at 17:33 UTC
    Sub::Uplevel is calling warnings which is calling perl-5.15.4, so I think that you have listed warnings somewhere in the autobundle. "warnings" is a core, nondual-lived module, so take warnings out of the bundle---that's my gut response. Or it might be easier to just do it in the shell:
    cpan> install Catalyst::Runtime Catalyst::Devel
    But before you do that, here's a list of modules that you need for the tests:
    #!/usr/bin/perl use strict; use warnings; use CPAN; CPAN::Shell->install(qw( Test::More Test::Pod Test::Pod::Coverage PadWalker Pod::Usage Getopt::Long Devel::Cycle Test::Memory::Cycle Log::Dispatch::Array Authen::Simple::Passwd CGI::Emulate::PSGI LWP::Protocol::http10 HTTP::Server::Simple::PSGI FCGI::ProcManager HTTP::Request::AsCGI UNIVERSAL::ref Test::HTTP CatalystX::LeakChecker));
    At a minimum, here are some env vars that need to be set:
    PERL_SIGNALS=safe TEST_POD=1 TEST_POD_COVERAGE=1 TEST_MEMORY_CYCLE=1 TEST_HTTP=1 TEST_STRESS=1 TEST_THREADS=1
    And here's a list of problematic modules that probably need to be installed as notests:
    #!/usr/bin/perl use strict; use warnings; use CPAN; CPAN::Shell->notest(qw( install Net::Server HTTP::Server::Simple HTTP::Server::Simple::PSGI Starman Twiggy));
    One more trick: If you want to install all the models in a namespace, let's say the Catalyst::Model namespace:
    #!/usr/bin/perl use strict; use warnings; use CPAN; print $_->install for CPAN::Shell->expand("Module", "/^Catalyst::Model/");
    And my favorite thing: the whole kaboodle:
    #!/usr/bin/perl use strict; use warnings; use CPAN; print $_->install for CPAN::Shell->expand("Module", "/^Catalyst/");