See here for one primitive way to do this type of thing. Valuing reliability and lower support costs over flexibility, we installed our version of Perl, along with our stable set of CPAN modules, on many different customer machines -- without affecting other versions of Perl that may be installed on their system, and without requiring root permissions.

BTW, my manager back then had previously worked at Microsoft, where a broken build cut onto millions of CDs was a total disaster ... their build team became paranoid, going to incredible lengths to avoid breaking the build; they'd even experienced cases where simply installing an OS patch broke their build! ... so their build machines were quarantined from the network, with only the build team allowed to touch them.

Reference

References Added Later

Like Fletch and stevieb, I strongly prefer to leave the system perl alone, instead building my own perl (as non-root) that I can safely control, and experiment with, and install CPAN modules to, without risking breaking my Unix system. Conversely, Fletch notes that relying on the system perl couples you tightly to the OS' upgrade schedule, for both the language and CPAN modules ... so a "harmless" OS upgrade can potentially break your mission-critical systems, if they are using the system perl.

Examples of installing a custom Perl:

From Re: Perl installation on Ubuntu and/or Mac OS by ikegami, to install the system Perl and Tk on Ubuntu:

sudo apt install perl perl-tk

See APT (software) (wikipedia) and apt (Advanced Packaging Tool) at Ubuntu package management (and this node which uses the apt-get command) for more details.

You could also install your own Perl using perlbrew (see App::perlbrew):

curl -L https://install.perlbrew.pl | bash perlbrew install 5.40.0 cpan Tk

Building Perl Securely

Examples of building Perl securely from source:

Windows and Strawberry Perl

Portable Perl

Historic Perl

On CPAN

PM Nodes

Platform-Specific perldoc Notes

Containerization

See: Cloud/Virtualization/Container References section at Re: "Magic tools" that take the fun away (Releng/DevOps/Cloud/Virtualization/Container/Server References)


In reply to Re: Replicate Perl setup (Building and Installing Perl References) by eyepopslikeamosquito
in thread Replicate Perl setup by nikosv

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.