in reply to Perl modules, was: Re^11: Begginer's question: If loops one after the other. Is that code correct?
in thread Begginer's question: If loops one after the other. Is that code correct?

Hi predrag,

Chart::Clicker is one of those distributions that has *lots* of dependencies, mostly because it uses the Moose object management system. The next time you install a new module that also requires those same dependencies, Perl will see that you already have them and they won't be installed again.

There should be no issue with space on your server or your home machine.

A long time ago when computers were not so powerful, there was concern about loading too many modules (whether directly or as dependencies) because your script could be slow to compile. But unless you are in a very specialized situation this should not be a concern either.

Hope this helps!


The way forward always starts with a minimal test.
  • Comment on Re: Perl modules, was: Re^11: Begginer's question: If loops one after the other. Is that code correct?

Replies are listed 'Best First'.
Re^2: Perl modules, was: Re^11: Begginer's question: If loops one after the other. Is that code correct?
by hippo (Archbishop) on Jan 18, 2017 at 16:34 UTC
    The next time you install a new module that also requires those same dependencies, Perl will see that you already have them and they won't be installed again.

    Unless of course that new module requires more recent versions of those dependencies.

    A long time ago when computers were not so powerful, there was concern about loading too many modules (whether directly or as dependencies) because your script could be slow to compile. But unless you are in a very specialized situation this should not be a concern either.

    That's a bit more contentious. Quite a lot of the time I avoid long (and broad) dependency chains. Reasons for this include:

    • The slow-compilation startup penalty to which you referred.
    • The extra memory requirements.
    • The increased fragility of the entire module stack.

    Given predrag's stated aim of investigating CGI then all of these points become relevant for him, I would suggest.

      "Quite a lot of the time I avoid long (and broad) dependency chains"

      As do I, quite a lot of the time. Here I was responding to what the OP wrote:

      Among other modules, I've installed Chart::Clicker (not sure now but probably with cpanminus) because found on the web that it is a simple yet powerful tool for plotting graphs etc. It was very surprising to see that it resulted in 102 distributions installed! The examples for that module work very well and graphs are really nice but I would have a question: ok, for a desktop computer the number of these modules is maybe not important but for the server, is it recommended to have just that so demanding module or work with some others?

      It's difficult to imagine a solution producing high quality graphs from a system graphics library -- his stated aim here -- that doesn't require both a lot of dependencies and a large memory footprint. It's also difficult to imagine that he won't sooner or later wind up installing Moose, like it or not. My comment was intended to put his mind at ease about what seemed questionable to him.


      The way forward always starts with a minimal test.