Skip to content

Instantly share code, notes, and snippets.

@kraih
Created June 5, 2019 11:54
Show Gist options
  • Save kraih/01ee1d7900c8bf776b93e7652b84f519 to your computer and use it in GitHub Desktop.
Save kraih/01ee1d7900c8bf776b93e7652b84f519 to your computer and use it in GitHub Desktop.
Use multiple versions of the same Perl library with local::lib
$ cpanm -Lperltidy_new Perl::Tidy
--> Working on Perl::Tidy
...
1 distribution installed
$ cpanm -Lperltidy_old Perl::Tidy@20181120
--> Working on Perl::Tidy
...
1 distribution installed
$ PATH="/home/sri/perltidy_new/bin:$PATH" PERL5LIB="/home/sri/perltidy_new/lib/perl5" perltidy -v
This is perltidy, v20190601
$ PATH="/home/sri/perltidy_old/bin:$PATH" PERL5LIB="/home/sri/perltidy_old/lib/perl5" perltidy -v
This is perltidy, v20181120
@kraih
Copy link
Author

kraih commented Jun 5, 2019

And if you're using an openSUSE Linux distribution you can get cpanm with zypper in perl-App-cpanminus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment