Alien-Tidyp
view release on metacpan or search on metacpan
inc/My/Builder.pm view on Meta::CPAN
sub ACTION_install {
my $self = shift;
my $sharedir = eval {File::ShareDir::dist_dir('Alien-Tidyp')} || '';
if ( -d $sharedir ) {
print STDERR "Removing the old '$sharedir'\n";
File::Path::rmtree($sharedir);
File::Path::mkpath($sharedir);
}
return $self->SUPER::ACTION_install(@_);
}
sub ACTION_code {
my $self = shift;
unless (-e 'build_done') {
$self->add_to_cleanup('build_done');
my $inst = $self->notes('installed_tidyp');
if (defined $inst) {
inc/My/Builder.pm view on Meta::CPAN
$self->config_data('share_subdir', $self->{properties}->{dist_version});
$self->config_data('config', { PREFIX => '@PrEfIx@',
LIBS => '-L' . $self->quote_literal('@PrEfIx@/lib') . ' -ltidyp',
INC => '-I' . $self->quote_literal('@PrEfIx@/include/tidyp'),
});
}
# mark sucessfully finished build
local @ARGV = ('build_done');
ExtUtils::Command::touch();
}
$self->SUPER::ACTION_code;
}
sub fetch_file {
my ($self, $url_list, $sha1sum, $download) = @_;
die "###ERROR### _fetch_file undefined url\n" unless $url_list;
die "###ERROR### _fetch_file undefined sha1sum\n" unless $sha1sum;
for my $url (@$url_list) {
my $ff = File::Fetch->new(uri => $url);
my $fn = catfile($download, $ff->file);
if (-e $fn) {
( run in 1.248 second using v1.01-cache-2.11-cpan-49f99fa48dc )