App-NoPAN
view release on metacpan or search on metacpan
lib/App/NoPAN/Installer/Configure.pm view on Meta::CPAN
sub can_install {
my ($klass, $nopan, $root_files) = @_;
! ! first { $_ =~ /^configure(\.ac|\.in|)$/ } @$root_files;
}
sub build {
my ($self, $nopan) = @_;
$self->shell_exec('autoreconf -i')
unless -e 'configure';
$self->shell_exec('./configure');
$self->SUPER::build($nopan);
}
1;
lib/App/NoPAN/Installer/Perl.pm view on Meta::CPAN
use CPAN::Inject;
use File::Temp;
use Archive::Tar qw/COMPRESS_GZIP/;
use CPAN ();
use Path::Class qw/dir/;
App::NoPAN->register(__PACKAGE__);
sub new {
my $class = shift;
my $self = $class->SUPER::new(@_);
my $tmp = File::Temp->new(UNLINK => 1, SUFFIX => '.tar.gz');
my $tar = Archive::Tar->new;
dir('.')->recurse(
callback => sub {
$tar->add_files($_[0]);
}
);
$tar->write($tmp->filename, COMPRESS_GZIP);
( run in 0.381 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )