Skip to content

Instantly share code, notes, and snippets.

@jerowe
Last active August 29, 2015 14:01
Show Gist options
  • Save jerowe/ea4ca3fd75db54a64225 to your computer and use it in GitHub Desktop.
Save jerowe/ea4ca3fd75db54a64225 to your computer and use it in GitHub Desktop.
Get Git::Hooks working with Perlbrew

Introduction

Git::Hooks requires Git.pm, which is not available on CPAN but does come with most system perl installations.

echo $PERL5LIB

If you have just one location you are golden. If you have many, separated by a ':', pick one and replace the following $PERL5LIB with that location.

When in doubt take a look at the output of

perlbrew info
#and/or
env |grep -i perl

Download directly

curl https://raw.githubusercontent.com/git/git/master/perl/Git.pm >> $PERL5LIB/Git.pm
cpanm Git::Hooks

Copy it over

locate Git.pm

Copy it over to your desired lib

All together now.

locate | xargs -0 -I {} cp {} $PERL5LIB/Git.pm
cpanm Git::Hooks

Acknowledgements

This module was originally developed at and for Weill Cornell Medical College in Qatar within ITS Advanced Computing Team. With approval from WCMC-Q, this information was generalized and put on github, for which the authors would like to express their gratitude.

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