Malcolm on 19 Oct 2012 07:41:07 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] perl and CPAN (was Re: Upcoming December talk)


On 9/19/2012 2:52 PM, Morgan Jones wrote:

only a month late, but...

This may not be a whole night's topic but it's always bugged me and
I'm curious if I'm alone:

I would be interested to hear how you use perl modules as a
programmer.  I do a fair amount of Perl programming and use my
scripts at different customer sites.  There is nothing I find more
frustrating than a script with a dozen dependencies which themselves
have several dependencies.  I'll admit it's been a while since I used
the CPAN module but it was only of moderate help the last time I used
it.

Ultimately what I do is try to meet my needs without modules and
limit my use to necessities.

Is there a trick I'm missing or are modules just difficult and that's
the way it is?

Modules should not be difficult. The whole point of CPAN is to make your life easier by not requiring you to reimplement the wheel.

There's a couple of modules that make it much easier to deal with:

 http://search.cpan.org/dist/App-cpanminus/lib/App/cpanminus.pm
cpanm (cpan-minus), which generally "just does the right thing" when installing modules without prompting you unless it absolutely has to.

 http://search.cpan.org/~apeiron/local-lib/
local:lib, which lets you install to and run using a local install of any modules. it also has a "core-only" option so that you know you have everything you might be dependent on in your local-lib.

Between them it makes it pretty easy to install and deploy what you need. Once I have my local-lib set up for a project, I can just copy the folder along with whatever script(s) I need and it Just Works(tm).

I generally don't get to the meets (being in the northern suburbs puts me a long way from both Center City and the PLUG "North" meetings), but I'd be happy to write up a walk through or discuss on or off list if there's an interest.
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug