Skip to content

Commit

Permalink
Update dist.ini style and repo meta files
Browse files Browse the repository at this point in the history
This changes from auto-versioning (2.YYDDDN) to auto-incrementing
(2.YYNNNN) and puts the generated Makefile.PL in the top directory
in place of cpanfile.

The CONTRIBUTING and perlcritic.rc files were updated to be consistent
with @dagolden's standard version of these files.
  • Loading branch information
xdg committed Mar 9, 2015
1 parent 909f726 commit e8fee50
Show file tree
Hide file tree
Showing 7 changed files with 178 additions and 126 deletions.
62 changes: 0 additions & 62 deletions CONTRIBUTING

This file was deleted.

87 changes: 87 additions & 0 deletions CONTRIBUTING.mkdn
@@ -0,0 +1,87 @@
## HOW TO CONTRIBUTE

Thank you for considering contributing to this distribution. This file
contains instructions that will help you work with the source code.

The distribution is managed with Dist::Zilla. This means than many of the
usual files you might expect are not in the repository, but are generated at
release time, as is much of the documentation. Some generated files are
kept in the repository as a convenience (e.g. Makefile.PL or cpanfile).

Generally, **you do not need Dist::Zilla to contribute patches**. You do need
Dist::Zilla to create a tarball. See below for guidance.

### Getting dependencies

If you have App::cpanminus 1.6 or later installed, you can use `cpanm` to
satisfy dependencies like this:

$ cpanm --installdeps .

Otherwise, look for either a `Makefile.PL` or `cpanfile` file for
a list of dependencies to satisfy.

### Running tests

You can run tests directly using the `prove` tool:

$ prove -l
$ prove -lv t/some_test_file.t

For most of my distributions, `prove` is entirely sufficient for you to test any
patches you have. I use `prove` for 99% of my testing during development.

### Code style and tidying

Please try to match any existing coding style. If there is a `.perltidyrc`
file, please install Perl::Tidy and use perltidy before submitting patches.

If there is a `tidyall.ini` file, you can also install Code::TidyAll and run
`tidyall` on a file or `tidyall -a` to tidy all files.

### Patching documentation

Much of the documentation Pod is generated at release time. Some is
generated boilerplate; other documentation is built from pseudo-POD
directives in the source like C<=method> or C<=func>.

If you would like to submit a documentation edit, please limit yourself to
the documentation you see.

If you see typos or documentation issues in the generated docs, please
email or open a bug ticket instead of patching.

### Installing and using Dist::Zilla

Dist::Zilla is a very powerful authoring tool, optimized for maintaining a
large number of distributions with a high degree of automation, but it has a
large dependency chain, a bit of a learning curve and requires a number of
author-specific plugins.

To install it from CPAN, I recommend one of the following approaches for
the quickest installation:

# using CPAN.pm, but bypassing non-functional pod tests
$ cpan TAP::Harness::Restricted
$ PERL_MM_USE_DEFAULT=1 HARNESS_CLASS=TAP::Harness::Restricted cpan Dist::Zilla

# using cpanm, bypassing *all* tests
$ cpanm -n Dist::Zilla

In either case, it's probably going to take about 10 minutes. Go for a walk,
go get a cup of your favorite beverage, take a bathroom break, or whatever.
When you get back, Dist::Zilla should be ready for you.

Then you need to install any plugins specific to this distribution:

$ cpan `dzil authordeps`
$ dzil authordeps | cpanm

Once installed, here are some dzil commands you might try:

$ dzil build
$ dzil test
$ dzil xtest

You can learn more about Dist::Zilla at http://dzil.org/

89 changes: 89 additions & 0 deletions Makefile.PL
@@ -0,0 +1,89 @@
# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.032.
use strict;
use warnings;

use 5.008;

use ExtUtils::MakeMaker 6.17;

my %WriteMakefileArgs = (
"ABSTRACT" => "the distribution metadata for a CPAN dist",
"AUTHOR" => "David Golden <dagolden\@cpan.org>, Ricardo Signes <rjbs\@cpan.org>",
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => "6.17"
},
"DISTNAME" => "CPAN-Meta",
"EXE_FILES" => [],
"LICENSE" => "perl",
"MIN_PERL_VERSION" => "5.008",
"NAME" => "CPAN::Meta",
"PREREQ_PM" => {
"CPAN::Meta::Requirements" => "2.121",
"CPAN::Meta::YAML" => "0.008",
"Carp" => 0,
"JSON::PP" => "2.27200",
"Parse::CPAN::Meta" => "1.4414",
"Scalar::Util" => 0,
"strict" => 0,
"version" => "0.88",
"warnings" => 0
},
"TEST_REQUIRES" => {
"Data::Dumper" => 0,
"ExtUtils::MakeMaker" => 0,
"File::Basename" => 0,
"File::Spec" => 0,
"File::Temp" => "0.20",
"IO::Dir" => 0,
"Test::More" => "0.88",
"overload" => 0,
"utf8" => 0
},
"VERSION" => "2.150001",
"test" => {
"TESTS" => "t/*.t"
}
);


my %FallbackPrereqs = (
"CPAN::Meta::Requirements" => "2.121",
"CPAN::Meta::YAML" => "0.008",
"Carp" => 0,
"Data::Dumper" => 0,
"ExtUtils::MakeMaker" => "6.17",
"File::Basename" => 0,
"File::Spec" => 0,
"File::Temp" => "0.20",
"IO::Dir" => 0,
"JSON::PP" => "2.27200",
"Parse::CPAN::Meta" => "1.4414",
"Scalar::Util" => 0,
"Test::More" => "0.88",
"overload" => 0,
"strict" => 0,
"utf8" => 0,
"version" => "0.88",
"warnings" => 0
);


unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
delete $WriteMakefileArgs{TEST_REQUIRES};
delete $WriteMakefileArgs{BUILD_REQUIRES};
$WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
}

delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
unless eval { ExtUtils::MakeMaker->VERSION(6.52) };

# Added by Dist::Zilla::Plugin::MakeMaker::Highlander
if ( $] < 5.012
&& ! $ENV{PERL_NO_HIGHLANDER}
&& ! ( $ENV{PERL_MM_OPT} && $ENV{PERL_MM_OPT} =~ /(?:INSTALL_BASE|PREFIX)/ )
&& ! grep { /INSTALL_BASE/ || /PREFIX/ } @ARGV
) {
$WriteMakefileArgs{UNINST} = 1;
}

WriteMakefile(%WriteMakefileArgs);
2 changes: 1 addition & 1 deletion README.mkdn
56 changes: 0 additions & 56 deletions cpanfile

This file was deleted.

7 changes: 0 additions & 7 deletions dist.ini
Expand Up @@ -14,8 +14,6 @@ match = ^t/data-
:version = 0.070
-remove = MakeMaker
-remove = PodWeaver
-remove = PkgVersion
auto_version = 1
authority = cpan:DAGOLDEN
no_minimum_perl = 1
tag_format = %v
Expand All @@ -38,11 +36,6 @@ stopwords = releaser
stopwords = subkey
stopwords = subkeys

[RewriteVersion]
skip_version_provider = 1

[BumpVersionAfterRelease]

[SurgicalPodWeaver]
:version = 0.0021
config_plugin = @DAGOLDEN
Expand Down
1 change: 1 addition & 0 deletions perlcritic.rc
Expand Up @@ -19,6 +19,7 @@ variables = $DB::single
[-References::ProhibitDoubleSigils]
[-RegularExpressions::RequireExtendedFormatting]
[-InputOutput::ProhibitTwoArgOpen]
[-Modules::ProhibitEvilModules]

# Turn this on
[Lax::ProhibitStringyEval::ExceptForRequire]
Expand Down

0 comments on commit e8fee50

Please sign in to comment.