1

we are using perlbrew for maintaining the various version of perl. Along , now we are facing challenges as we need to update the scripts to the latest CPAN module. But we want still some the script to keep make use of old perl module till the compatibility issue is resolved.

Is there any away to install the lastest version of module with impacting the older version

made_in_india
  • 2,109
  • 5
  • 40
  • 63

3 Answers3

2

perlbrew keeps each version separate, include its CPAN modules. If you run:

perl -E'say for @INC'

you will see the Perl version in the paths. If you switch the Perl, you will see different paths for @INC.

shawnhcorey
  • 3,545
  • 1
  • 15
  • 17
1

You can still use PERL5LIB with perlbrew-installed perl. But since you're already using perlbrew, why not just install a second build of that version of Perl for use with your newer scripts? Upgrading modules for one perl install won't affect others.

ikegami
  • 367,544
  • 15
  • 269
  • 518
0

In some environments, Carton maybe the tool you are looking for. It requires a cpanfile where the dependencies are specified, so each script should be handled as an independent application in order to isolate each of them

Miguel Prz
  • 13,718
  • 29
  • 42