Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

A Home For Perl Modules

by periapt (Hermit)
on Oct 20, 2004 at 20:27 UTC ( #400980=perlquestion: print w/ replies, xml ) Need Help??
periapt has asked for the wisdom of the Perl Monks concerning the following question:


I just wanted to get some guidence from the monks on the placement of perl modules, standard and home grown. I maintain perl on just a couple of machines and I do most of the coding in the unit myself. I currently have the standard modules installed on each workstations C: drive (WinXP, ActiveState 5.6.1). I also have a general home grown module library contained on a network drive. I add the lib to the path at the start of those programs that need it. I have it set up this way to keep from having to push the changes to these libraries to each individual machine. They are in active development and change frequently.

The set up seems a little kludgy to me in that, whenever I add modules to my own workstation during development, I have to remember to go to each workstation and load those modules to it. Too often I forget, or miss one. How embarrasing

I have, occasionally, considered moving the entire Perl library out to a network drive so that I could update once for everyone. However, it seems the windows setup wants to be installed on the local machine and I am unsure as to how difficult it would be to change things.

Has anyone had any experience trying this on a Win32 platform?
Update:
Thanks for the great suggestions. It seems like one or more of them will meet my needs. Thanks again.

PJ
use strict; use warnings; use diagnostics;

Comment on A Home For Perl Modules
Re: A Home For Perl Modules
by ikegami (Pope) on Oct 20, 2004 at 20:54 UTC
    Maybe setting environment var PERL5LIB would be more convenient.
Re: A Home For Perl Modules
by dragonchild (Archbishop) on Oct 21, 2004 at 00:55 UTC
    This is the general problem of maintaining code across multiple machines. (Paul Graham has a few words about this when he talks about his company that became YahooStores.)

    What you're going to want to do is what most commercial apps do - have a little thing that checks to see if there's an updated version on a regular basis. Either do it on startup (like Adobe) or Windows, which does it on a regular basis.

    The infrastructure for the updating is to run your own CPAN server, serving up your custom modules. There are a number of nodes on Perlmonks that will give you ideas on how to do that. I know merlyn has done a column on something similar.

    Being right, does not endow the right to be rude; politeness costs nothing.
    Being unknowing, is not the same as being stupid.
    Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
    Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

Re: A Home For Perl Modules
by raptnor2 (Beadle) on Oct 21, 2004 at 01:34 UTC
    Why not load Perl modules from an HTTP server? I know this sounds a little odd, but the Java community started this practice to publish standard libraries that applications servers (not just J2EE stuff) could pull the most recent code from a known place on startup. Java uses an HTTP class loader (similar to Applets) for this.

    I don't have time to search CPAN for this, but I would assume that this would be pretty easy to do with Perl and that someone has already done it. If not, it seems that some startup code could be run to:

    • 1.Get a list of files from a CGI or SOAP script.
    • 2.Download each file path that is returned (from any HTTP source).
    • 3.Place them in some local directory.
    • 4.Add this directory to Perl's library path.
    • 5.Start running the rest of your code.
    The benefit is your local Perl installations would only need a boot loader to pull the rest of the files down to run. You only need to publish your application code to some HTTP server and write a CGI/SOAP script to list them.

    An idea anyway (and one that should work on Win32 without a problem).

    Cheers,

    John

      I don't have time to search CPAN for this, but I would assume that this would be pretty easy to do with Perl and that someone has already done it.

      Yes, it's already been done and it's in the Acme namespace, where it belongs, as Acme::Intraweb.

Re: A Home For Perl Modules
by waswas-fng (Curate) on Oct 21, 2004 at 03:57 UTC
    PAR lets you use remote modules that are loaded and cached by LWP. So you can use a very simple shell app on the servers and they can update and load their real cores and such transparently from a web server.


    -Waswas

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://400980]
Approved by Joost
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2014-07-10 11:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (207 votes), past polls