Skip to content

Instantly share code, notes, and snippets.

@JJ
Last active January 6, 2017 11:32
Show Gist options
  • Select an option

  • Save JJ/9826608 to your computer and use it in GitHub Desktop.

Select an option

Save JJ/9826608 to your computer and use it in GitHub Desktop.
Install Git.pm in a perlbrew installation

Git.pm is a module that comes with git and can't be installed with the usual cpan magic. If you switch to perlbrew you'll get a Can't locate Git.pm error when you try to run it, so you need to install it explicitly if you want to use it in your own installation, mainly if you use perlbrew I use it in my novels for post-commit hooks, so here's what you have to do to have it available in your programs

bash$ cp /usr/share/perl5/Git.pm ~/perl5/perlbrew/perls/perl-5.x.y/lib/site_perl/5.x.y

you'll have to change x.y by the perl version you're actually using. You'll also need Error.pm, so do

bash$ cp /usr/share/perl5/Error.pm ~/perl5/perlbrew/perls/perl-5.x.y/lib/site_perl/5.x.y

And that's it!

@jluis

jluis commented Mar 28, 2014

Copy link
Copy Markdown

I have tested it using ln -s in place of cp and it works as it should my comands :

ln -s /usr/share/perl5/Error* perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/
ln -s /usr/share/perl5/Git* perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/

@JJ

JJ commented Jan 6, 2017

Copy link
Copy Markdown
Author

Great, thanks!

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