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!