Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Cloning a Perl installation on Windows

by herby1620 (Monk)
on Feb 28, 2006 at 21:43 UTC ( [id://533519]=perlquestion: print w/replies, xml ) Need Help??

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

Now I've done it!! I just installed ActiveState Perl (5.8.7) on a "lab" machine (it was at an earlier version). That was a nice idea, but it has some modules lacking that I have on my "desk" machine. Is there some way I can (using ppm, or some such) get the files necessary from the "desk" machine to the "lab" machine so everything will be nice and cosy. I can copy files between them, but the lab machine doesn't have access to the "outside world" (look I didn't do it!). Surely there is a simple way to do this (bulk copy of files, etc...). I'm reluctant to "experiment" with the "lab" machine as it looks like I've done quite enough to muck it up. A quick idea would be VERY helpful from a nice Monk. Thanks!!

Replies are listed 'Best First'.
Re: Cloning a Perl installation on Windows
by BrowserUk (Patriarch) on Feb 28, 2006 at 23:13 UTC

    If both machines are running the same version of perl, then you should be able to zip up the entire site/lib directory on your desk machine and unzip into the appropriate place on your lab machine. NB: That a pretty definite "should", but I've never done it between machines.

    Alternatively (and safer), you can download the zipped PPM packages, copy them to the lab machine, unzip them in a temp directory and install them from there using the syntax:

    ppm install c:\tempdir\package.ppd

    See the AS docs for more detail.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      Yup, zipping up the site/lib directory and dropping it in place definitely works, as I used this technique when I had a desktop PC upgrade. The old machine is still there on a different floor of the building.

      Also, some of the modules had been installed by PPM, some by CPAN and others by hand; replicating this would have been a nightmare.

      --

      Oh Lord, won’t you burn me a Knoppix CD ?
      My friends all rate Windows, I must disagree.
      Your powers of persuasion will set them all free,
      So oh Lord, won’t you burn me a Knoppix CD ?
      (Missquoting Janis Joplin)

      Well, at first blush, it looks like this solution might work. I did copy the .../site/lib directory over and it gets a little bit further. Now I think I have an incompatibility somewhere else, but the problem is "local in nature". I've got a bad de-reference (access to location zero). Another story.
      Now if this were a 68k Mac, I'd do an SC6 and find out where it was calling from. But that too long ago. (*SIGH*).
Re: Cloning a Perl installation on Windows
by InfiniteSilence (Curate) on Mar 01, 2006 at 00:03 UTC
    Don't go through all of this trouble. Read merlyn's article titled: Mirroring your own mini-CPAN. Modify the script to grab only the modules you want to mirror. Then have all of your individual installations update from your mirror.

    Update:: I forgot to mention why you might want to do it this way -- you would want to run new modules on a development instance to ensure that they don't break your existing code before you allow them to be replicated around to your other machines.

    Celebrate Intellectual Diversity

Re: Cloning a Perl installation on Windows
by CountZero (Bishop) on Mar 01, 2006 at 14:39 UTC
    Provided both machines run a more or less similar OS, you can simply bulk copy the whole of the Perl-folder to the new machine. I've done that numerous times. As a matter of fact I have one folder which contains Apache + MySQL + Perl (including mod_perl) and just copy it to a CD or DVD and load it on the other machine. The only "issue" I ever got was that the new machine did not have the same drive-letters and this broke some configurations, but that was easily repaired.

    If one can do it with the whole Perl-tree, I see no reason why it would not work with individual modules. You might get some outdated modules in your tree this way, but solving that is as simple as running the "upgrade" command in CPAN or PPM.

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Re: Cloning a Perl installation on Windows
by mattr (Curate) on Mar 01, 2006 at 12:26 UTC
    Just to be complete I remember the challenge vmware.com is sending for people to make virtual appliances (pc or linux emulators with a complete os installed in the image). Personally I would be trying cygwin instead (and this is certainly a way for you to go to). But it also seems that for a lab pc you don't want to mess with, a virtual appliance might also be a valid option. You could bring updated versions of this virtual pc in on a CD. Otherwise I'd imagine cygwin or activestate would do at least a minimal amount of mucking about in the registry etc. when they get installed, unless say you just unzip to a folder.
Re: Cloning a Perl installation on Windows
by Marza (Vicar) on Feb 28, 2006 at 21:54 UTC

    Ahm? I think you have a system administration issue here.

    If you are working with lab machines; why not look into ghost and sysprep?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://533519]
Approved by Tanktalus
Front-paged by planetscape
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-04-18 05:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found