Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Finding Git.pm regardless of where your packager decided it should be
#!/usr/bin/perl
use strict;
use lib $ENV{GITPERLLIB}
? split(/:/, $ENV{GITPERLLIB})
: do {
chomp(my $exec_path = qx{git --exec-path});
open my $gitsvn, "<", "$exec_path/git-svn" or die "Cannot find git-svn";
{
last unless local $_ = readline $gitsvn;
redo unless m{\Ause lib.*GITPERLLIB.*\|\| "(.*)"};
"$1";
}
};
use Git;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.