Alien::git - Find system git
version 0.10
From Perl:
use Alien::git; use Env qw( @PATH ); unshift @PATH, Alien::git->bin_dir; my $git = Alien::git->exe; system $git, 'clone 'http://example.com/foo.git';
From alienfile:
use alienfile;
share {
download [
[ '%{git}', 'clone', 'http://example.com/foo.git' ],
];
...
};
This module, like other Aliens, can be used as a dependency on the git source control tool. Unlike many other Aliens, it will only work with a system install. That is to say, it will only work if git is already installed. Some day down the line, it may also attempt to download and install git, as other Aliens do in the event that the operating system does not provide it. The main thing that this module provides today is a alienfile helper to invoke git.
This module uses the first git in the system PATH by default. You can override this by using the ALIEN_GIT environment variable. You should also set this environment variable when you are installing this module.
my @dirs = Alien::git->bin_dir;
Returns the list of directories that need to be added to the PATH in order for git to work.
'%{git}'
Returns the command to invoke git. This is usually the full path to the git executable.
Graham Ollis <plicease@cpan.org>
This software is copyright (c) 2017-2022 by Graham Ollis.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.