Alien-Autotools
view release on metacpan or search on metacpan
my ($version) = $bin_path
? do {
my ($output) = ( run(
command => [$bin_path, "--version"] ) )[2][0] =~ /([\d.]+)/ }
: "0.0.0";
# Convert to semantic version
$version ||= "0.0.0";
$version =~ s/^(?<!.)(\d\.\d+)$/$1.0/m;
if ( !$ENV{COMPILE_ALIEN_AUTOTOOLS}
&& version->new($version) >= $_->{min_version} ) {
say "Version $version of $tool found; skipping compilation...";
# Skipping installation and passing directory of path found by &can_run:
$tool => join "", ( splitpath($bin_path) )[0, 1] }
else {
say "Downloading $tool source archive from ftp.gnu.org...";
my $ftp = Net::FTP->new("ftp.gnu.org")
or die "Unable to connect to FTP server";
$ftp->login or die "Unable to anonymously login to FTP server";
$ftp->binary;
$ftp->get($ftp_path) or die "Failed to download $ftp_path";
$ftp->quit;
my ($archive) = glob("*.tar.gz");
Archive::Tar->new($archive)->extract;
unlink $archive;
( run in 0.858 second using v1.01-cache-2.11-cpan-483215c6ad5 )