; See this to understand: http://dzil.org/tutorial/convert-dist.html
name = Git-Hooks
author = Gustavo L. de M. Chaves <gnustavo@cpan.org>
license = Perl_5
copyright_holder = CPqD <www.cpqd.com.br>
[GatherDir]
exclude_match = ~$
[@Filter]
-bundle = @Basic
-remove = MakeMaker
-remove = GatherDir
-remove = Readme
[MakeMaker::Awesome]
delimiter = |
header = | # see http://wiki.cpantesters.org/wiki/CPANAuthorNotes
header = | if ($^O eq 'MSWin32') {
header = | warn "I do not support Windows yet. Sorry.\n";
header = | exit 0;
header = | }
header = |
header = | sub git {
header = | my ($args) = @_;
header = | my $output = `git $args`;
header = | if ($? == -1) {
header = | warn "Failed to execute 'git $args': $!\n";
header = | exit 0;
header = | } elsif ($? != 0) {
header = | warn "Command 'git $args' died with exit code=$?\n";
header = | exit 0;
header = | }
header = | return $output;
header = | }
header = |
header = | # Check if we have a proper git
header = | chomp(my $git_version = git('version'));
header = | if (my ($major, $minor, $patch) = ($git_version =~ /(\d+)\.(\d+)\.(\d+)/)) {
header = | if ($major < 1 || $major == 1 && ($minor < 7 || $minor == 7 && $patch < 1)) {
header = | warn "Don't support gits older than 1.7.1. Your version is $git_version.\n";
header = | exit 0;
header = | }
header = | } else {
header = | warn "Couldn't parse git version: '$git_version'\n";
header = | exit 0;
header = | }
[NextRelease]
[MetaProvides::Package]
[AutoPrereqs]
skip = Email::Valid
skip = Gerrit::REST
skip = HTML::Entities
skip = JIRA::REST
skip = Text::SpellChecker
[Prereqs / TestRequires]
Config = 0
Test::Requires::Git = 0
[Prereqs / Recommends]
; Required in order to use Gerrit hooks
Gerrit::REST = 0
; Required by Git::Hooks::CheckCommit's 'email-valid' option
Email::Valid = 0
; Required by Git::Hooks::CheckJira
JIRA::REST = 0
; Required by Git::Hooks::CheckLog's 'spelling' option
Text::SpellChecker = 0
; Required by Git::Hooks::Notify to send email in HTML
HTML::Entities = 0
[PodWeaver]
[PkgVersion]
[MetaJSON]
[PodSyntaxTests]
[PodCoverageTests]
[Test::Kwalitee]
[@Git]
[Git::NextVersion]
[@Filter]
-bundle = @GitHub
-remove = GitHub::Meta
[MetaResources]
homepage = https://github.com/gnustavo/Git-Hooks/blob/next/README.pod
bugtracker = https://github.com/gnustavo/Git-Hooks/issues
repository = https://github.com/gnustavo/Git-Hooks.git
[Keywords]
keywords = git gerrit jira
[Meta::Contributors]
contributor = Mikko Koivunalho <mikkoi@cpan.org>
contributor = Dave Rolsky <autarch@urth.org>
contributor = Szymon NieznaĆski <s.nez@member.fsf.org>
[Test::MinimumVersion]
max_target_perl = 5.10
[Test::NoTabs]
[Test::Perl::Critic]
[Test::Portability]
[Test::UnusedVars]