Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Re: How Many Modules Is Too Many?

by PodMaster (Abbot)
on May 30, 2004 at 06:30 UTC ( [id://357564]=note: print w/replies, xml ) Need Help??


in reply to Re: How Many Modules Is Too Many?
in thread How Many Modules Is Too Many?

Modules with no prerequisites are the ones to watch out for! Most likely they're reinventing some wheels under the covers.
reinventing or just plain stealing the wheels :) I know one monk who eliminates prerequisites by inlining only the functions he uses into his code.

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.

Replies are listed 'Best First'.
Re: Re: Re: How Many Modules Is Too Many?
by gmpassos (Priest) on May 30, 2004 at 23:03 UTC
    But this doesn't means that with this chunks of codes, that come from other modules to avoid requisites, I'm not adding new things! Generally this chunks of codes are revised, fixed and upgraded.

    But note that here our policy of development is to always create a system not much dependent of others. 1st because our enverioment that we develop need to be easy to install, 2nd because it need to be portable for many OS, and dependecies make this harder.

    For example, XML::Smart has his own parser, XML::Smart::Parser, that is a upgrade and fix of XML::Parser::Lite. Why that? Because XML::Parser, the main XML parser for Perl, uses 26 modules. But the biggest problem is not to load 26 modules, but this modules come from a lot of different distributions (XML::Parser need: URI, HTPP, LWP, libwww...), that need much more things to be installed. So, 1 dependency generally means more sub-dependencies.

    History also shows to us that big dependencies make the probabiblity of bugs bigger, and is harder to fix them, but the biggest problem is the probability to have incompatibilities in the future with new versions. I know that, since I try to use less dependencies as possible, and I had this problem in less than 1 year with 2 modules.

    Graciliano M. P.
    "Creativity is the expression of the liberty".

      The following post should be in reply to gmpassos' post above.
      The biggest problem with using CPAN modules is code redundancy. Lets say that we have a module for creating a menu on the console. That module has code built in for ANSI escapes rather than using the ANSI modules. So we've saved loading some modules and people would be happy.

      That's all well and good if all we want is a menu. However we also want to display a result message so we load the ANSI modules ourselves.

      So now we have the ANSI functionality twice!

      If the menu module documented that is contained ANSI methods we could, naturally, just use those. But consider this: We now want to use another module that displays a group of ANSI checkboxes .. and it was written by yet another developer so she's also included all the ANSI stuff in that module (to save people loading dozens of extra modules!)

      So now we have the ANSI functionality twice again!

      In situations where people don't want all the extra installation hassles with the extra modules, I'd encourage them to create bundles. Thus ANSI::Foo requires ANSI::Util rather than just replicating it's behaviour. But then there's Bundle::ANSI::Foo which installs all the prerequisites without too much user interaction.

      "Get real! This is a discussion group, not a helpdesk. You post something, we discuss its implications. If the discussion happens to answer a question you've asked, that's incidental." -- nobull@mail.com in clpm

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (6)
As of 2024-03-19 09:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found