Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

A perlbrew question

by Oberon (Monk)
on May 30, 2012 at 00:46 UTC ( [id://973159]=perlquestion: print w/replies, xml ) Need Help??

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

O enlightened Perl masters, I lay my humble question at your feet:

Okay, so I have this module, and I have a bug report that says it doesn't install properly if module X isn't installed. Unfortunately, I have module X installed ... in fact, I have several Perls running under perlbrew, and it's installed in every one of them.

So, it occurs to me that all I need to test this is a new Perl, wherein I will install absolutely nothing. Except, it now occurs to me to wonder ... since I already have one or more Perls in my perlbrew, and since all I really want is a Perl with no modules installed, and since it takes forever-and-a-day to build a new Perl, shouldn't there be some sort of way to copy one of my perlbrew Perls without copying all the modules? That's bound to be quicker than building from scratch ... right? (FTM, is it even possible to have two Perls in a perlbrew with the same version?)

The perlbrew docs don't seem to be any help. Is it possible to do what I'm thinking? Or is there a better way to achieve what I want to achieve?

(PS: Yes, I know I will probably spend more time waiting for an answer here than it would take to just build a new Perl, but it's the principle, dammit!)

Replies are listed 'Best First'.
Re: A perlbrew question
by kcott (Archbishop) on May 30, 2012 at 01:20 UTC

    I have 2 Perlbrew installations of v5.14.2 - one with threads; one without. I gave them different names with the --as option to the install command (see perlbrew). I haven't tried installing exactly identical versions under different names.

    -- Ken

      I gave them different names with the --as option to the install command ...

      Ah, the --as option ... that's what I was missing. Thx, good tip.

Re: A perlbrew question
by ikegami (Patriarch) on May 30, 2012 at 04:24 UTC

    Copying an installed Perl won't work. It'll keep looking in the original location.

    What really takes long is the testing. You can skip it using -n aka --notest.

      What really takes long is the testing. You can skip it using -n

      Aha, another good tip! So, if I really do need to create a parallel perl with the same version, I can just do perlbrew install -n --as secondperl or somesuch, and I should be all set.

      Thanx a bunch everyone!

Re: A perlbrew question
by Anonymous Monk on May 30, 2012 at 01:19 UTC
    Uninstall the module cpanp -u Module
      Uninstall the module cpanp -u Module

      You know, that didn't occur to me, because I've never really used CPANPlus. I looked for an uninstall switch in CPANMinus and didn't find one, so I sort of gave up at that point. But you're absolutely right: cpanp -u does the trick neatly, and that totally solves my problem.

      Thanx!

Re: A perlbrew question
by stuckdownawell (Initiate) on May 30, 2012 at 07:45 UTC

    Hi I'm pretty new to perlbrew, so I might be doing something wrong, but here is how I use it.

    I install a version of Perl with perlbrew install, use that version with perlbrew use, then for each project / application I am going to use it with, I create a separate library with perlbrew lib create. If you perlbrew list, then you will see both perl-version and perl-version@project in the list. To use the library use perlbrew use perl-version@project. Now anything you cpan / install, will go into this library rather than the base perlbrew version, keeping things separate.

    The one gotcha I found is that I now need to do perlbrew use perlversion, then perlbrew use perl-version@project, to use both the perlbrew version and library combination, but that is not a big issue

    Again, I am new to perlbrew, so there may well be a better way than this

      I install a version of Perl with perlbrew install, use that version with perlbrew use, then for each project / application I am going to use it with, I create a separate library with perlbrew lib create .

      Hmmm ... I haven't played around with the lib command yet. Seems like overkill for what I'm doing here, but I'll check it out. Probably a good thing to know in general.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-04-20 03:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found