in reply to Replicate Perl setup

The CPAN module has an autobundle command which will write a Bundle::Snapshot_YYYY_MM_DD_XX (the last XX being a counter) containing a list of modules and revisions which are installed that you can use to have it reinstall the same set. You could use that to prime an install of the same base perl version somewhere else which (depending on the OS and compiler state) should be more or less identical.

The cake is a lie.
The cake is a lie.
The cake is a lie.

Replies are listed 'Best First'.
Re^2: Replicate Perl setup
by nikosv (Deacon) on Dec 10, 2021 at 16:28 UTC
    this looks promising, thanks!
Re^2: Replicate Perl setup
by nikosv (Deacon) on Feb 03, 2024 at 09:50 UTC
    Does this work even with modules install with cpanm (cpan minus) ?

      It uses the list/manifest of installed modules which is written by the module’s make install process which is independent of what you use to install. So long as you’re not (say) copying things into the lib hierarchy by hand it’ll find things.

      Edit: Afterthought if you’re asking can cpanm install a bundle module list generated by CPAN . . . That’s actually an interesting question and I’m not sure. The bundle pod is written into the .cpan config dirs and I don’t know if minus can/would look there; but if it (App::cpanminus) can handle them I’d bet it would. Personally when using this feature I’m bootstrapping a new Perl install and I’m expecting minus to be one of the things to get installed by said bundle so it’s not anything I’ve tried.

      The cake is a lie.
      The cake is a lie.
      The cake is a lie.