http://qs321.pair.com?node_id=11118537


in reply to Re: Best approach for temporarily swapping out a single perl module for a different version?
in thread Best approach for temporarily swapping out a single perl module for a different version?

Let me see if I got this straight because I'm not familiar with local::lib and I'm using perlbrew which created ~/perl5 for me.

So basically you create a giant git repo for all the modules located in the root of ~/perl5? And then when you want to upgrade a single module, you create a new branch and modify that single module? Is that right?

$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks

  • Comment on Re^2: Best approach for temporarily swapping out a single perl module for a different version?

Replies are listed 'Best First'.
Re^3: Best approach for temporarily swapping out a single perl module for a different version?
by choroba (Cardinal) on Jun 25, 2020 at 15:36 UTC
    Exactly. Adding a change can take a second or two, switching the branches is blazing fast.

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

      Very cool. One more question, though. I'm not very adept with git and trying to wrap my head around how I might incorporate your solution into my current setup.

      So I have a ~/git_repos directory for cloned modules from github where I keep perl modules that I contribute patches to. These repos track the upstream module and my own forked copy of the module. I also have a ~/perl/modules directory where I keep all my locally developed modules. These modules get installed to my local machine and they also get pushed out to cpan and github from this directory. This is where I modify my $PERL5LIB as appropriate to load the module from either ~/git_repos or ~/perl/modules.

      Do you have any suggestions for how I might be able manage these repos connected to github and still use your solution?

      $PM = "Perl Monk's";
      $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
      $nysus = $PM . ' ' . $MCF;
      Click here if you love Perl Monks