For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > December 2005 > Freeze CPAN module version for just one script on system?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Freeze CPAN module version for just one script on system?
pbdgny@gmail.com

2005-12-16, 3:55 am

Hello,

I would like to use a complex CPAN module group that is currently under
active revision. (Task::Catalyst)

Is there a way to use the cpan shell to install a "local" version of the
module for just this application so I don't have to worry about things
breaking if the main CPAN library install on the server upgrades this
module? (Other modules outside the specified "module group" that are
required can be used from the regular Perl install as I am not too worried
about those APIs changing... )

From what I understand, I think that there is a way to make a per-user
library area, but this is not quite the per-app application granularity I
need.

Any ideas?

Thanks,
David

Paul Lalli

2005-12-16, 7:56 am

pbdgny@gmail.com wrote:
> I would like to use a complex CPAN module group that is currently under
> active revision. (Task::Catalyst)
>
> Is there a way to use the cpan shell to install a "local" version of the
> module for just this application so I don't have to worry about things
> breaking if the main CPAN library install on the server upgrades this
> module? (Other modules outside the specified "module group" that are
> required can be used from the regular Perl install as I am not too worried
> about those APIs changing... )


Can't you just set the PREFIX attribute of the makepl_arg, so that the
modules get installed somewhere other than the default library?

o conf makepl_arg PREFIX=/dir_for_this_app

Then in whatever application you have that wants to use these modules,
make sure they include the line:
use lib '/dir_for_this_app';
before any of the lines that 'use' the relevant modules.

> From what I understand, I think that there is a way to make a per-user
> library area, but this is not quite the per-app application granularity I
> need.


This is simply a specialized version of the above, as you can have
every user set his/her makepl_arg to something in their own home
directory, such as:
o conf makepl_arg PREFIX=~/lib

Paul Lalli

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com