Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

50 lines (38 sloc) 1.359 kb
name 'dzil';
description 'Build dzil based distributions from git/svn repositories';
author 'Tatsuhiko Miyagawa';
api_version 0.1;
hook pre_configure => sub {
my $args = shift;
if (-e "dist.ini" && !-e 'Makefile.PL' && !-e 'Build.PL') {
$args->{app}->chat("Found dist.ini - build this distribution using dzil");
push @{$args->{deps}}, 'Dist::Zilla', 0;
require Config::INI::Reader;
my $hash = Config::INI::Reader->read_file("dist.ini");
while (my($k, $v) = each %{$hash->{_}}) {
$args->{meta}->{$k} = $v;
}
for my $key (keys %$hash) {
next if $key eq '_';
$key = (split m{\s*/\s*}, $key)[0];
$key =~ s/^\s*//;
if ($key =~ s/^\@//) {
push @{$args->{deps}}, "Dist::Zilla::PluginBundle::$key", 0;
} elsif ($key =~ s/^=//) {
push @{$args->{deps}}, $key, 0;
} else {
push @{$args->{deps}}, "Dist::Zilla::Plugin::$key", 0;
}
}
}
};
hook build_dist => sub {
my $args = shift;
if (-e "dist.ini" && !-e 'Makefile.PL' && !-e 'Build.PL') {
$args->{app}->chat("Running dzil install");
return sub {
system "dzil", "install", "--install-command=$^X -S cpanm .";
};
}
return;
};
Jump to Line
Something went wrong with that request. Please try again.