Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: Does Perl have a baked-in memory llimit?

by eyepopslikeamosquito (Archbishop)
on Nov 12, 2023 at 01:43 UTC ( [id://11155572]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Does Perl have a baked-in memory llimit?
in thread Does Perl have a baked-in memory llimit?

Is that... Don't use File::Slurp for this use case or is it don't use File::Slurp EVER! ???

For me, it's ever ... despite being good mates with File::Slurp's original author Uri Guttman. :)

Though mostly a matter of taste for individuals working alone, dependencies are crucial when working in teams and especially for CPAN authors (such as the BOD :) because the price of depending on simple convenience modules, such as File::Slurp, is way too high:

  • What if your dependent module has a security vulnerability?
  • What if the author abandons it?
  • How quickly can you isolate/troubleshoot a bug in its code? (e.g. in a vital production system)

It's a different story for more complex domains, such as DBI and XML, where it makes sense to leverage the work of experts in fields that you are not expert in.

More detail on this topic can be found in the Dependencies section at Writing Solid CPAN Modules.

👁️🍾👍🦟

Replies are listed 'Best First'.
Re^4: Does Perl have a baked-in memory llimit?
by einhverfr (Friar) on Nov 13, 2023 at 03:56 UTC

    Most software these days has a fairly large number of dependencies, which is part of the reason software bill of materials requirements are becoming a thing. Certainly managing that is a consideration. On the other hand.... Popular CPAN modules provide a lot of benefits including:

    • More eyes are likely present
    • More hands to take over where needed

    My advice instead is to read through code of many of the dependencies you want to use and then decide if you might want have to maintain that code. The bar is far lower in test cases (where I usually use File::Slurp) than in production (where I don't).

    Reading through the code gives some sense though of why not to use File::Slurp.....And I do pity the guy who took over maintaining it. And I say this as someone who has taken over CPAN modules in the past over maintenance needs....

      > The bar is far lower in test cases (where I usually use File::Slurp) than in production (where I don't)

      I feel this is a dangerous mindset, especially in larger organisations, as indicated by these two points from Effective Automated Testing:

      • Automated test suite needs ongoing maintenance. So test code should be well-designed and maintainable; that is, you should avoid the common pitfall of "oh, it's only test code, so I'll just quickly cut n paste this code".
      • It's vital to quarantine intermittently failing tests quickly and to fix them quickly ... only returning them to the main build when reliable (if you don't do that, people start ignoring test failures!). No broken windows.

      👁️🍾👍🦟
Re^4: Does Perl have a baked-in memory llimit?
by ikegami (Patriarch) on Nov 15, 2023 at 04:07 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2025-05-21 03:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.