kiat has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks,

I'm curious to know why most CPAN modules/packages are not only large but dependent on lots of other smaller packages.

Can there not be small, stand-alone CPAN packages? If I need to use package XYZ and it happens not to be installed in the server, I could easily upload that package to the server, thus bypassing the need to persuade the hosting company to install the particular package.

Or is there a way to install the needed package within the cgi-bin directory under your hosting account?

Replies are listed 'Best First'.
Re: Small, stand-alone modules...
by jasonk (Parson) on Oct 16, 2003 at 14:48 UTC

    There are hundreds of small, stand-alone packages in CPAN, it just appears that the ones you want to use are more complex than most small packages.

    For information on installing modules in your own directory, try this node: Installation of modules in home directory.


    We're not surrounded, we're in a target-rich environment!
Re: Small, stand-alone modules...
by ctilmes (Vicar) on Oct 16, 2003 at 15:27 UTC
    I think CPAN modules are often dependent on other CPAN modules for the same reasons you are considering making your programs depend on CPAN modules...
Re: Small, stand-alone modules...
by jdtoronto (Prior) on Oct 16, 2003 at 17:16 UTC
    As others have said this is a function in many respoects of the hosting company. I have used many over the years and have finally come to the conclusion that it is easier to run my own servers than to rely on hosting outfits! So about 6 months ago I bought a bunch of new machines and put them in a colocation facility.

    Others are right when they say that there are indeed many small CPAN modules, I have some I use which are Per Perl and are no more than 20 lines of code! Small enough for ya? The whole idea of CPAN is reusability, so of course module writers will tend to use proven code in the form of CPAN modules rather than reinvent the wheel.

    If you are using a shared machine look for a small reseller who is using CPANEL. Check out webhostingtalk.com and see if you can get a recopmendation for a reliable one. Many of these resellers or small hosts have boxes in larger centres using the CPANEL/WHM management system. CPANEL usually installs a lot of modules and additional ones can very easily be installed by the sysadmin from his own GUI. Only very rarely does he need to actually download and compile manually. The CPANEL system uses the CPAN module to do the installation.

    jdtoronto

Re: Small, stand-alone modules...
by Anonymous Monk on Oct 16, 2003 at 15:34 UTC

    Exactly! Why do we have all these large modules/packages that do extremely complicated things yet still provide an easy-to-use interface? Can't every CPAN author just golf their modules to hell? Why do they bother using modules from CPAN, a software repository that was created so others could reuse code that has usually been considered and tested longer than the usual development phase of any perl web project? I mean, the author of the module is only contributing to the same repository. Who cares about overlap? What are we paying these people for?

    I say we abandon CPAN. I think it's finally time for us to pass around a petition for the implementation of the read_my_brain() built-in and send it to the p5p'ers. Who's with me?

    Removing tongue from cheek,
    Anonymous Monk

Re: Small, stand-alone modules...
by cbraga (Pilgrim) on Oct 16, 2003 at 15:30 UTC
    Your hosting company sucks. CPAN installs all dependant packages automatically. Or, if they use a lame packaging system such as RPM, that can install the dependencies automatically too. A new hosting company is what you need, not new packages.

    ESC[78;89;13p ESC[110;121;13p