Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Prefer Pure Perl Core Modules

by Fletch (Bishop)
on Jul 13, 2021 at 15:04 UTC ( [id://11134959]=note: print w/replies, xml ) Need Help??


in reply to Prefer Pure Perl Core Modules

WRT to your item 5: If you're doing anything serious with Perl you DO NOT want to use the OS' perl as that way lies much pain. Doing so couples you tightly to the OS' upgrade schedule for both the language and (if you're using its package manager for them) CPAN modules. If you're in some sort of (e.g.) shared hosting environment where you don't have tight control over the OS and what's installed it's probably just a matter of time until something "upgrades" underneath you and you're stuck either pleading for a rollback or trying to patch your code to work around some issue. (edit Even if you do have some degree of control you can still shoot yourself when you find your OS upgrade installed a breaking change; speaking from experience here as I learned this principle the hard way . . .)

You should always whip up your own "application perl" (by hand or with perlbrew) and use that to run your code and probably even use something like local::lib or Carton to maintain your CPAN dependencies.

(Granted if your "OS'" perl is from a container context you could prossibly relax this requirement because you're in effect baking up your own controlled "separate" perl install; that's a bit different in the details but similar in spirit.)

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

Replies are listed 'Best First'.
Re^2: Prefer Pure Perl Core Modules
by eyepopslikeamosquito (Archbishop) on Jul 13, 2021 at 23:17 UTC

    Excellent answer.

    > If you're doing anything serious with Perl you DO NOT want to use the OS' perl as that way lies much pain

    Strongly agree! Update: see also Re: Replicate Perl setup (Building and Installing Perl References)

    Unfortunately in Re^4: Rediscovering Hubris (in January) the OP stated:

    I also failed to communicate something that impacts what you wrote. I work on system tools that rely on the customer's OS version of Perl. We don't embed Perl into the tool, and the customer base tends to use older OS versions.

Re^2: Prefer Pure Perl Core Modules
by Anonymous Monk on Jul 13, 2021 at 15:09 UTC
    You should also use the "shared hosting environment" strategy of having your own application-dependent directory listed first in PERL5LIB, installing your own copy of every package that your application needs, so that you do not have unmapped dependencies on the OS-installed versions of packages.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11134959]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (6)
As of 2024-04-23 15:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found