[Purdue-pm] Question about Versions

Doug Yatcilla yatcilla at purdue.edu
Wed Jul 9 08:38:20 PDT 2014

On Wed Jul  9 11:19:31 2014, Dave Jacoby <jacoby.david at gmail.com> wrote:
> We might go into this deeper on Tuesday (less than a week until the next
> Perl Mongers meeting! See you at 11:30 in WSLR 116!), but this is an issue
> I'm having.
> In Javascript, when I include a library I wrote, I put <script
> src="bulldada_0.1.js"> and if I want to work on the module and make
> changes, I can do that to bulldada_0.2.js, and I can change the HTML when
> and if I'm ready to use 0.2. Theoretically, I can have a directory full of
> bulldada_*.*.js.
> The capabilities are almost there with Perl. I can specify a version in my
> module:
> package Bull::Dada ;
> our $VERSION = 0.01 ;
> 1
> I can specify a version number in my code;
> use strict ;
> use lib '/home/jacoby/lib' ;
> use Bull::Dada 0.01 ;
> But, Bull::Dada, as I understand it, has to be
> /home/jacoby/lib/Bull/Dada.pm. I couldn't have it be /home/jacoby/lib/Bull/
> Dada_0.01.pm alongside Dada_0.02.pm, where I'm changing the subroutines
> around and such, but I'm not ready to use it in real code, or perhaps it
> uses OAuth 2.0 while 0.01 uses OAuth 1.0 or whatever.
> To my knowledge, I cannot do this in Perl, as much as I may desire it. Am I
> wrong?

I, too, would be interested in knowing how to manage multiple versions
of perl modules in a single Perl installation.  I don't think it is
easily done though.

Here is an old but probably abandoned attempt:

The above idea might be feasible for you, though.  Keep different
module versions in different directories and adjust $PERL5LIB or 
"use lib" path to correspond to the version you want.

I hear some use http://perlbrew.pl/ to keep multiple versions of perl
(and associated modules) around.  But it seems designed more as a 
single-user solution rather than a system-wide one.

Perl 6 might address this issue:


More information about the Purdue-pm mailing list