From 4c69acca625b64cfeca96c27492e95ef11dd9e86 Mon Sep 17 00:00:00 2001 From: Kent Fredric Date: Fri, 17 Jul 2015 11:48:06 +1200 Subject: [PATCH] Build results of 8586dac (on master) --- .gitignore | 13 +++- Changes | 9 +++ INSTALL.SKIP | 1 + MANIFEST | 4 +- META.json | 61 +++++++++++---- META.yml | 8 +- Makefile.PL | 2 +- bin/gentoo-perlmod-version.pl | 66 ++++++++++++++++- dist.ini | 21 +++++- dist.ini.meta | 4 +- lib/Gentoo/PerlMod/Version.pm | 4 +- lib/Gentoo/PerlMod/Version/Env.pm | 4 +- lib/Gentoo/PerlMod/Version/Error.pm | 4 +- maint/fatpack.pl | 77 +++++++++++++++++++ maint/gentoo-perlmod-version.pl | 111 ++++++++++++++++++++++++++++ maint/perlcritic.rc.gen.pl | 1 + misc/Changes.deps | 4 +- misc/Changes.deps.all | 13 +++- misc/Changes.deps.dev | 13 +++- misc/Changes.deps.opt | 4 +- misc/built_with.json | 11 +-- perlcritic.rc | 2 +- t/00-report-prereqs.dd | 5 +- xt/release/minimum-version.t | 8 -- 24 files changed, 394 insertions(+), 56 deletions(-) create mode 100644 INSTALL.SKIP create mode 100644 maint/fatpack.pl create mode 100644 maint/gentoo-perlmod-version.pl delete mode 100644 xt/release/minimum-version.t diff --git a/.gitignore b/.gitignore index e122ee5..de0074e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,11 @@ -.build -Gentoo-PerlMod-Version-* +/.build +/Gentoo-PerlMod-Version-* +/tmp/ +/META.json +/MYMETA.json +/META.yml +/MYMETA.yml +/Makefile +/Makefile.old +/blib/ +/pm_to_blib diff --git a/Changes b/Changes index c128031..b30ad90 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,14 @@ Release history for Gentoo-PerlMod-Version +0.8.0 2015-07-16T23:24:29Z 301fe54 + [00 Major / Features] + - gentoo-perlmod-version.pl is now fatpacked. + - This means the code should run better in mixed environments as well as between perl upgrades + + [Dependencies::Stats] + - Dependencies changed since 0.7.1, see misc/*.deps* for details + - develop: +2 -1 (suggests: ↑1) + 0.7.1 2015-06-23T03:30:53Z 8b35638 [00 Minor] - Avoid using an XS dep to simply iterate an array pairwise. diff --git a/INSTALL.SKIP b/INSTALL.SKIP new file mode 100644 index 0000000..f6e97b0 --- /dev/null +++ b/INSTALL.SKIP @@ -0,0 +1 @@ +CONTRIBUTING\.pod$ diff --git a/MANIFEST b/MANIFEST index 7931e59..a415bc3 100644 --- a/MANIFEST +++ b/MANIFEST @@ -4,6 +4,7 @@ .perltidyrc .travis.yml Changes +INSTALL.SKIP LICENSE MANIFEST META.json @@ -16,6 +17,8 @@ dist.ini.meta lib/Gentoo/PerlMod/Version.pm lib/Gentoo/PerlMod/Version/Env.pm lib/Gentoo/PerlMod/Version/Error.pm +maint/fatpack.pl +maint/gentoo-perlmod-version.pl maint/perlcritic.rc.gen.pl misc/Changes.deps misc/Changes.deps.all @@ -40,6 +43,5 @@ xt/author/eol.t xt/release/cpan-changes.t xt/release/distmeta.t xt/release/kwalitee.t -xt/release/minimum-version.t xt/release/pod-coverage.t xt/release/pod-syntax.t diff --git a/META.json b/META.json index 4d5d0a1..03c2faf 100644 --- a/META.json +++ b/META.json @@ -29,6 +29,7 @@ }, "requires" : { "Dist::Zilla" : "5", + "Dist::Zilla::Plugin::Author::KENTNL::CONTRIBUTING" : "0.001003", "Dist::Zilla::Plugin::Author::KENTNL::RecommendFixes" : "0.004002", "Dist::Zilla::Plugin::Author::KENTNL::TravisCI" : "0.001002", "Dist::Zilla::Plugin::Authority" : "1.006", @@ -65,13 +66,13 @@ "Dist::Zilla::Plugin::Prereqs::Upgrade" : "0", "Dist::Zilla::Plugin::Readme::Brief" : "0", "Dist::Zilla::Plugin::ReadmeAnyFromPod" : "0", + "Dist::Zilla::Plugin::RemovePrereqs::Provided" : "0", "Dist::Zilla::Plugin::RewriteVersion::Sanitized" : "0", "Dist::Zilla::Plugin::RunExtraTests" : "0", "Dist::Zilla::Plugin::Test::CPAN::Changes" : "0", "Dist::Zilla::Plugin::Test::Compile::PerFile" : "0", "Dist::Zilla::Plugin::Test::EOL" : "0", "Dist::Zilla::Plugin::Test::Kwalitee" : "0", - "Dist::Zilla::Plugin::Test::MinimumVersion" : "0", "Dist::Zilla::Plugin::Test::Perl::Critic" : "0", "Dist::Zilla::Plugin::Test::ReportPrereqs" : "0", "Dist::Zilla::Plugin::TestRelease" : "0", @@ -88,7 +89,7 @@ }, "suggests" : { "Dist::Zilla::App::Command::bakeini" : "0.002005", - "Dist::Zilla::PluginBundle::Author::KENTNL" : "2.024002" + "Dist::Zilla::PluginBundle::Author::KENTNL" : "2.025001" } }, "runtime" : { @@ -122,15 +123,15 @@ "provides" : { "Gentoo::PerlMod::Version" : { "file" : "lib/Gentoo/PerlMod/Version.pm", - "version" : "v0.7.1" + "version" : "v0.8.0" }, "Gentoo::PerlMod::Version::Env" : { "file" : "lib/Gentoo/PerlMod/Version/Env.pm", - "version" : "v0.7.1" + "version" : "v0.8.0" }, "Gentoo::PerlMod::Version::Error" : { "file" : "lib/Gentoo/PerlMod/Version/Error.pm", - "version" : "v0.7.1" + "version" : "v0.8.0" } }, "release_status" : "stable", @@ -145,7 +146,7 @@ "web" : "https://github.com/kentnl/Gentoo-PerlMod-Version" } }, - "version" : "0.7.1", + "version" : "0.8.0", "x_BuiltWith" : { "external_file" : "misc/built_with.json" }, @@ -230,7 +231,9 @@ "README", "README.mkdn", "README.pod", - "LICENSE" + "CONTRIBUTING.pod", + "LICENSE", + "Makefile.PL" ], "exclude_match" : [], "follow_symlinks" : "0", @@ -277,6 +280,24 @@ "name" : "@Author::KENTNL/Author::KENTNL::TravisCI", "version" : "0.001002" }, + { + "class" : "Dist::Zilla::Plugin::Author::KENTNL::CONTRIBUTING", + "config" : { + "Dist::Zilla::Plugin::Author::KENTNL::CONTRIBUTING" : { + "document_version" : "0.1" + }, + "Dist::Zilla::Plugin::GenerateFile::ShareDir" : { + "destination_filename" : "CONTRIBUTING.pod", + "dist" : "Dist-Zilla-Plugin-Author-KENTNL-CONTRIBUTING", + "encoding" : "UTF-8", + "location" : "root", + "phase" : "build", + "source_filename" : "contributing-0.1.pod" + } + }, + "name" : "@Author::KENTNL/Author::KENTNL::CONTRIBUTING", + "version" : "0.001004" + }, { "class" : "Dist::Zilla::Plugin::CopyFilesFromBuild", "name" : "@Author::KENTNL/CopyXBuild", @@ -329,11 +350,6 @@ "name" : "@Author::KENTNL/Test::EOL", "version" : "0.18" }, - { - "class" : "Dist::Zilla::Plugin::Test::MinimumVersion", - "name" : "@Author::KENTNL/Test::MinimumVersion", - "version" : "2.000006" - }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@Author::KENTNL/Test::Compile::PerFile/AUTOVIV/:InstallModulesPM", @@ -528,7 +544,7 @@ { "class" : "Dist::Zilla::Plugin::Author::KENTNL::RecommendFixes", "name" : "@Author::KENTNL/Author::KENTNL::RecommendFixes", - "version" : "0.004003" + "version" : "0.005001" }, { "class" : "Dist::Zilla::Plugin::Readme::Brief", @@ -537,6 +553,11 @@ }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", + "config" : { + "Dist::Zilla::Role::FileWatcher" : { + "version" : "0.006" + } + }, "name" : "@Author::KENTNL/ReadmeAnyFromPod", "version" : "0.150250" }, @@ -615,7 +636,7 @@ "Dist::Zilla::Plugin::Git::Tag" : { "branch" : null, "signed" : 0, - "tag" : "0.7.1-source", + "tag" : "0.8.0-source", "tag_format" : "%v-source", "tag_message" : "v%v", "time_zone" : "local" @@ -629,6 +650,11 @@ }, { "class" : "Dist::Zilla::Plugin::Git::NextRelease", + "config" : { + "Dist::Zilla::Plugin::Git::NextRelease" : { + "default_branch" : "master" + } + }, "name" : "@Author::KENTNL/Git::NextRelease", "version" : "0.004000" }, @@ -686,7 +712,7 @@ "Dist::Zilla::Plugin::Git::Tag" : { "branch" : "releases", "signed" : 0, - "tag" : "0.7.1", + "tag" : "0.8.0", "tag_format" : "%v", "tag_message" : "v%v", "time_zone" : "local" @@ -749,6 +775,11 @@ "name" : "@Author::KENTNL/always_latest_develop_bundle", "version" : "0.003001" }, + { + "class" : "Dist::Zilla::Plugin::RemovePrereqs::Provided", + "name" : "@Author::KENTNL/RemovePrereqs::Provided", + "version" : "0.001000" + }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { diff --git a/META.yml b/META.yml index bafcd68..e101320 100644 --- a/META.yml +++ b/META.yml @@ -22,13 +22,13 @@ name: Gentoo-PerlMod-Version provides: Gentoo::PerlMod::Version: file: lib/Gentoo/PerlMod/Version.pm - version: v0.7.1 + version: v0.8.0 Gentoo::PerlMod::Version::Env: file: lib/Gentoo/PerlMod/Version/Env.pm - version: v0.7.1 + version: v0.8.0 Gentoo::PerlMod::Version::Error: file: lib/Gentoo/PerlMod/Version/Error.pm - version: v0.7.1 + version: v0.8.0 requires: Carp: '0' Data::Dumper: '0' @@ -42,4 +42,4 @@ resources: bugtracker: https://github.com/kentnl/Gentoo-PerlMod-Version/issues homepage: https://github.com/kentnl/Gentoo-PerlMod-Version repository: https://github.com/kentnl/Gentoo-PerlMod-Version.git -version: 0.7.1 +version: 0.8.0 diff --git a/Makefile.PL b/Makefile.PL index 4be5fc3..54d6c4c 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -35,7 +35,7 @@ my %WriteMakefileArgs = ( "Test::Fatal" => 0, "Test::More" => "0.96" }, - "VERSION" => "0.7.1", + "VERSION" => "0.8.0", "test" => { "TESTS" => "t/*.t t/00-compile/*.t" } diff --git a/bin/gentoo-perlmod-version.pl b/bin/gentoo-perlmod-version.pl index ba47e86..b20aac5 100644 --- a/bin/gentoo-perlmod-version.pl +++ b/bin/gentoo-perlmod-version.pl @@ -1,11 +1,73 @@ #!/usr/bin/env perl + +## no critic +# This chunk of stuff was generated by App::FatPacker. To find the original +# file's code, look for the end of this BEGIN block or the string 'FATPACK' +BEGIN { +my %fatpacked; + +$fatpacked{"Gentoo/PerlMod/Version.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'GENTOO_PERLMOD_VERSION'; + use 5.006;use strict;use warnings;package Gentoo::PerlMod::Version;our$VERSION='0.8.0';use Sub::Exporter::Progressive -setup=>{exports=>[qw(gentooize_version)]};use version 0.77;sub gentooize_version {my ($perlver,$config)=@_;$config ||= {};if (not defined$perlver){return _err_perlver_undefined($config)}$config->{lax}=0 unless defined$config->{lax};if (_env_hasopt('always_lax')){$config->{lax}=_env_getopt('always_lax')}if ($perlver =~ /\Av?[\d.]+\z/msx){return _lax_cleaning_0($perlver)}if ($perlver =~ /\Av?[\d._]+(-TRIAL)?\z/msx){if ($config->{lax}> 0){return _lax_cleaning_1($perlver)}return _err_matches_trial_regex_nonlax($perlver,$config)}if (2==$config->{lax}){return _lax_cleaning_2($perlver)}return _err_not_decimal_or_trial($perlver,$config)}my$char_map={(map {$_=>$_}0 .. 9),(map {chr($_ + 65)=>$_ + 10}0 .. 25),(map {chr($_ + 97)=>$_ + 10}0 .. 25),};sub _code_for {my$char=shift;if (not exists$char_map->{$char}){my$char_ord=ord$char;return _err_bad_char($char,$char_ord)}return$char_map->{$char}}sub _enc_pair {my (@tokens)=@_;if (not @tokens){return q{}}if (@tokens < 2){return _code_for(shift@tokens)}return (_code_for($tokens[0])* 36)+ (_code_for($tokens[1]))}sub _ascii_to_int {my$string=shift;my@chars=split //msx,$string;my@output;while (@chars){push@output,_enc_pair(splice@chars,0,2,())}return join q{.},@output}sub _lax_cleaning_0 {my$version=shift;return _expand_numeric($version)}sub _lax_cleaning_1 {my$version=shift;my$isdev=0;my$prereleasever=undef;if ($version =~ s/-TRIAL\z//msx){$isdev=1}if ($version =~ s/_(.*)\z/$1/msx){$prereleasever="$1";$isdev=1;if ($prereleasever =~ /_/msx){return _err_lax_multi_underscore($version)}}$version=_expand_numeric($version);if ($isdev){$version .= '_rc'}return$version}sub _lax_cleaning_2 {my$version=shift;my$istrial=0;my$has_v=0;if ($version =~ s/-TRIAL\z//msx){$istrial=1}if ($version =~ s/\Av//msx){$has_v=1}my@parts=split /([._])/msx,$version;my@out;for (@parts){if (/\A[_.]\z/msx){push@out,$_;next}if (/\A\d\z/msx){push@out,$_;next}push@out,_ascii_to_int($_)}my$version_out=join q{},@out;if ($istrial){$version_out .= '-TRIAL'}if ($has_v){$version_out='v' .$version_out}return _lax_cleaning_1($version_out)}sub _expand_numeric {my$perlver=shift;my$ver=version->parse($perlver)->normal;$ver =~ s/\Av//msx;my@tokens=split /[.]/msx,$ver;my@out;for (@tokens){s/\A0+([1-9])/$1/msx;push@out,$_}return join q{.},@out}BEGIN {for my$err (qw(perlver_undefined matches_trial_regex_nonlax not_decimal_or_trial bad_char lax_multi_underscore)){my$code=sub {require Gentoo::PerlMod::Version::Error;my$sub=Gentoo::PerlMod::Version::Error->can($err);goto$sub};no strict 'refs';*{__PACKAGE__ .'::_err_' .$err}=$code}for my$env (qw(opts hasopt getopt)){my$code=sub {require Gentoo::PerlMod::Version::Env;my$sub=Gentoo::PerlMod::Version::Env->can($env);goto$sub};no strict 'refs';*{__PACKAGE__ .'::_env_' .$env}=$code}}1; +GENTOO_PERLMOD_VERSION + +$fatpacked{"Gentoo/PerlMod/Version/Env.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'GENTOO_PERLMOD_VERSION_ENV'; + use 5.006;use strict;use warnings;package Gentoo::PerlMod::Version::Env;our$VERSION='0.8.0';my$state;my$env_key='GENTOO_PERLMOD_VERSION_OPTS';sub opts {return$state if defined$state;$state={};return$state if not defined$ENV{$env_key};my (@tokes)=split /\s+/msx,$ENV{$env_key};for my$token (@tokes){if ($token =~ /\A([^=]+)=(.+)\z/msx){$state->{"$1"}="$2"}elsif ($token =~ /\A-(.+)\z/msx){delete$state->{"$1"}}else {$state->{$token}=1}}return$state}sub hasopt {my ($opt)=@_;return exists opts()->{$opt}}sub getopt {my ($opt)=@_;return opts()->{$opt}}1; +GENTOO_PERLMOD_VERSION_ENV + +$fatpacked{"Gentoo/PerlMod/Version/Error.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'GENTOO_PERLMOD_VERSION_ERROR'; + use 5.006;use strict;use warnings;package Gentoo::PerlMod::Version::Error;our$VERSION='0.8.0';BEGIN {for my$env (qw(opts hasopt getopt)){my$code=sub {require Gentoo::PerlMod::Version::Env;my$sub=Gentoo::PerlMod::Version::Env->can($env);goto$sub};no strict 'refs';*{__PACKAGE__ .'::_env_' .$env}=$code}}sub perlver_undefined {my ($config)=@_;return _fatal({code=>'perlver_undefined',config=>$config,message=>'Argument \'$perlver\' to gentooize_version was undefined',},)}sub matches_trial_regex_nonlax {my ($perlver,$config,)=@_;return _fatal({code=>'matches_trial_regex_nonlax',config=>$config,want_lax=>1,message=>'Invalid version format (non-numeric data, either _ or -TRIAL ).',message_extra_tainted=>qq{ Version: >$perlver< },version=>$perlver,},)}sub not_decimal_or_trial {my ($perlver,$config)=@_;return _fatal({code=>'not_decimal_or_trial',config=>$config,want_lax=>2,message=>'Invalid version format (non-numeric/ASCII data).',message_extra_tainted=>qq{ Version: >$perlver< },version=>$perlver,},)}sub bad_char {my ($char,$char_ord)=@_;return _fatal({code=>'bad_char',message=>'A Character in the version is not in the ascii-to-int translation table.',message_extra_tainted=>qq{ Missing character: $char ( $char_ord )},},)}sub lax_multi_underscore {my ($version)=@_;return _fatal({code=>'lax_multi_underscore',message=>q{More than one _ in a version is not permitted},message_extra_tainted=>qq{ Version: >$version< },version=>$version,},)}sub _format_error {my ($conf)=@_;my$message=$conf->{message};if (exists$conf->{want_lax}){my$lax=$conf->{want_lax};$message .= qq{\n Set { lax => $lax } for more permissive behaviour. }}if (_env_hasopt('taint_safe')){return$message}if (_env_hasopt('carp_debug')){$conf->{env_config}=_env_opts;require Data::Dumper;local$Data::Dumper::Indent=2;local$Data::Dumper::Purity=0;local$Data::Dumper::Useqq=1;local$Data::Dumper::Terse=1;local$Data::Dumper::Quotekeys=0;return Data::Dumper::Dumper($conf)}if (exists$conf->{'message_extra_tainted'}){$message .= $conf->{'message_extra_tainted'}}if (exists$conf->{'stack'}){for (@{$conf->{stack}}){if ($_->[0]!~ /\AGentoo::PerlMod::Version(?:|::Error|::Env)\z/msx){$message .= sprintf qq[\n - From %s in %s at line %s\n],$_->[0]|| q[],$_->[1]|| q[],$_->[2]|| q[];last}}}return$message}use overload q[""]=>\&_format_error;sub _fatal {my ($conf)=@_;require Carp;$conf->{stack}=[map {[$_->[0],$_->[1],$_->[2],]}map {[caller $_,]}0 .. 10,];return Carp::croak(bless$conf,__PACKAGE__)}1; +GENTOO_PERLMOD_VERSION_ERROR + +$fatpacked{"Sub/Exporter/Progressive.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'SUB_EXPORTER_PROGRESSIVE'; + package Sub::Exporter::Progressive;use strict;use warnings;our$VERSION='0.001011';use Carp ();use List::Util ();sub import {my ($self,@args)=@_;my$inner_target=caller;my$export_data=sub_export_options($inner_target,@args);my$full_exporter;no strict 'refs';@{"${inner_target}::EXPORT_OK"}=@{$export_data->{exports}};@{"${inner_target}::EXPORT"}=@{$export_data->{defaults}};%{"${inner_target}::EXPORT_TAGS"}=%{$export_data->{tags}};*{"${inner_target}::import"}=sub {use strict;my ($self,@args)=@_;if (List::Util::first {ref ||!m/ \A [:-]? \w+ \z /xm}@args){Carp::croak 'your usage of Sub::Exporter::Progressive requires Sub::Exporter to be installed' unless eval {require Sub::Exporter};$full_exporter ||= Sub::Exporter::build_exporter($export_data->{original});goto$full_exporter}elsif (defined(my$num=List::Util::first {!ref and m/^\d/}@args)){die "cannot export symbols with a leading digit: '$num'"}else {require Exporter;s/ \A - /:/xm for@args;@_=($self,@args);goto \&Exporter::import}};return}my$too_complicated=<<'DEATH';sub sub_export_options {my ($inner_target,$setup,$options)=@_;my@exports;my@defaults;my%tags;if ($setup eq '-setup'){my%options=%$options;OPTIONS: for my$opt (keys%options){if ($opt eq 'exports'){Carp::croak$too_complicated if ref$options{exports}ne 'ARRAY';@exports=@{$options{exports}};Carp::croak$too_complicated if List::Util::first {ref}@exports}elsif ($opt eq 'groups'){%tags=%{$options{groups}};for my$tagset (values%tags){Carp::croak$too_complicated if List::Util::first {/ \A - (?! all \b ) /x || ref}@{$tagset}}@defaults=@{$tags{default}|| []}}else {Carp::croak$too_complicated}}@{$_}=map {/ \A [:-] all \z /x ? @exports : $_}@{$_}for \@defaults,values%tags;$tags{all}||= [@exports ];my%exports=map {$_=>1}@exports;my@errors=grep {not $exports{$_}}@defaults;Carp::croak join(', ',@errors)." is not exported by the $inner_target module\n" if@errors}return {exports=>\@exports,defaults=>\@defaults,original=>$options,tags=>\%tags,}}1; + You are using Sub::Exporter::Progressive, but the features your program uses from + Sub::Exporter cannot be implemented without Sub::Exporter, so you might as well + just use vanilla Sub::Exporter + DEATH +SUB_EXPORTER_PROGRESSIVE + +s/^ //mg for values %fatpacked; + +my $class = 'FatPacked::'.(0+\%fatpacked); +no strict 'refs'; +*{"${class}::files"} = sub { keys %{$_[0]} }; + +if ($] < 5.008) { + *{"${class}::INC"} = sub { + if (my $fat = $_[0]{$_[1]}) { + return sub { + return 0 unless length $fat; + $fat =~ s/^([^\n]*\n?)//; + $_ = $1; + return 1; + }; + } + return; + }; +} + +else { + *{"${class}::INC"} = sub { + if (my $fat = $_[0]{$_[1]}) { + open my $fh, '<', \$fat + or die "FatPacker error loading $_[1] (could be a perl installation issue?)"; + return $fh; + } + return; + }; +} + +unshift @INC, bless \%fatpacked, $class; + } # END OF FATPACK CODE + +## use critic use 5.006; use strict; use warnings; package Gentoo::PerlMod::Version::Tool; -our $VERSION = '0.7.1'; +our $VERSION = '0.8.0'; # PODNAME: gentoo-perlmod-version.pl @@ -100,7 +162,7 @@ =head1 NAME =head1 VERSION -version 0.7.1 +version 0.8.0 =head1 SYNOPSIS diff --git a/dist.ini b/dist.ini index 2936739..58a8b56 100644 --- a/dist.ini +++ b/dist.ini @@ -34,7 +34,9 @@ order_by = name exclude_filename = README exclude_filename = README.mkdn exclude_filename = README.pod +exclude_filename = CONTRIBUTING.pod exclude_filename = LICENSE +exclude_filename = Makefile.PL include_dotfiles = 1 [License / @Author::KENTNL/License] @@ -48,8 +50,15 @@ include_dotfiles = 1 [Author::KENTNL::TravisCI / @Author::KENTNL/Author::KENTNL::TravisCI] :version = 0.001002 +[Author::KENTNL::CONTRIBUTING / @Author::KENTNL/Author::KENTNL::CONTRIBUTING] +-location = root +-phase = build +:version = 0.001003 +document_version = 0.1 + [CopyFilesFromBuild / @Author::KENTNL/CopyXBuild] copy = LICENSE +copy = Makefile.PL [MetaTests / @Author::KENTNL/MetaTests] @@ -64,8 +73,6 @@ copy = LICENSE [Test::EOL / @Author::KENTNL/Test::EOL] trailing_whitespace = 1 -[Test::MinimumVersion / @Author::KENTNL/Test::MinimumVersion] - [Test::Compile::PerFile / @Author::KENTNL/Test::Compile::PerFile] [Test::Perl::Critic / @Author::KENTNL/Test::Perl::Critic] @@ -80,16 +87,18 @@ normal_form = normal_3 replacer = replace_with_blank [AutoPrereqs / @Author::KENTNL/AutoPrereqs] +finder = :InstallModules [Prereqs / @Author::KENTNL/BundleDevelSuggests] -phase = develop -type = suggests Dist::Zilla::App::Command::bakeini = 0.001000 -Dist::Zilla::PluginBundle::Author::KENTNL = 2.024002 +Dist::Zilla::PluginBundle::Author::KENTNL = 2.025001 [Prereqs::AuthorDeps / @Author::KENTNL/Prereqs::AuthorDeps] [MinimumPerl / @Author::KENTNL/MinimumPerl] +runtime_finder = :InstallModules [Authority / @Author::KENTNL/Authority] :version = 1.006 @@ -129,6 +138,7 @@ tag_format = %v-source [Git::NextRelease / @Author::KENTNL/Git::NextRelease] :version = 0.004000 +default_branch = master format = %v %{yyyy-MM-dd'T'HH:mm:ss}dZ %h time_zone = UTC @@ -169,6 +179,8 @@ applyto_phase = develop modules = Dist::Zilla::PluginBundle::Author::KENTNL modules = Dist::Zilla::App::Command::bakeini +[RemovePrereqs::Provided / @Author::KENTNL/RemovePrereqs::Provided] + [Prereqs / @Author::KENTNL/::Role::BundleDeps] ;version_major = 0 ;version_minor = 1 @@ -180,6 +192,7 @@ modules = Dist::Zilla::App::Command::bakeini ;version_rel_time_zone = Pacific/Auckland -phase = develop -relationship = requires +Dist::Zilla::Plugin::Author::KENTNL::CONTRIBUTING = 0.001003 Dist::Zilla::Plugin::Author::KENTNL::RecommendFixes = 0.004002 Dist::Zilla::Plugin::Author::KENTNL::TravisCI = 0.001002 Dist::Zilla::Plugin::Authority = 1.006 @@ -215,13 +228,13 @@ Dist::Zilla::Plugin::Prereqs::Recommend::MatchInstalled = 0 Dist::Zilla::Plugin::Prereqs::Upgrade = 0 Dist::Zilla::Plugin::Readme::Brief = 0 Dist::Zilla::Plugin::ReadmeAnyFromPod = 0 +Dist::Zilla::Plugin::RemovePrereqs::Provided = 0 Dist::Zilla::Plugin::RewriteVersion::Sanitized = 0 Dist::Zilla::Plugin::RunExtraTests = 0 Dist::Zilla::Plugin::Test::CPAN::Changes = 0 Dist::Zilla::Plugin::Test::Compile::PerFile = 0 Dist::Zilla::Plugin::Test::EOL = 0 Dist::Zilla::Plugin::Test::Kwalitee = 0 -Dist::Zilla::Plugin::Test::MinimumVersion = 0 Dist::Zilla::Plugin::Test::Perl::Critic = 0 Dist::Zilla::Plugin::Test::ReportPrereqs = 0 Dist::Zilla::Plugin::TestRelease = 0 diff --git a/dist.ini.meta b/dist.ini.meta index 2466e20..3c05b84 100644 --- a/dist.ini.meta +++ b/dist.ini.meta @@ -13,9 +13,11 @@ bumpversions = 1 normal_form = normal_3 toolkit = eumm toolkit_hardness = soft -copyfiles = LICENSE srcreadme = mkdn twitter_extra_hash_tags = #gentoo +AutoPrereqs.finder = :InstallModules +MinimumPerl.runtime_finder = :InstallModules +-remove = Test::MinimumVersion ;version_major = 0 ;version_minor = 1 diff --git a/lib/Gentoo/PerlMod/Version.pm b/lib/Gentoo/PerlMod/Version.pm index a8c707d..29d60c6 100644 --- a/lib/Gentoo/PerlMod/Version.pm +++ b/lib/Gentoo/PerlMod/Version.pm @@ -4,7 +4,7 @@ use warnings; package Gentoo::PerlMod::Version; -our $VERSION = '0.7.1'; +our $VERSION = '0.8.0'; # ABSTRACT: Convert arbitrary Perl Modules' versions into normalized Gentoo versions. @@ -241,7 +241,7 @@ Gentoo::PerlMod::Version - Convert arbitrary Perl Modules' versions into normali =head1 VERSION -version 0.7.1 +version 0.8.0 =head1 SYNOPSIS diff --git a/lib/Gentoo/PerlMod/Version/Env.pm b/lib/Gentoo/PerlMod/Version/Env.pm index a8c809a..3600972 100644 --- a/lib/Gentoo/PerlMod/Version/Env.pm +++ b/lib/Gentoo/PerlMod/Version/Env.pm @@ -4,7 +4,7 @@ use warnings; package Gentoo::PerlMod::Version::Env; -our $VERSION = '0.7.1'; +our $VERSION = '0.8.0'; # ABSTRACT: Get/parse settings from %ENV @@ -82,7 +82,7 @@ Gentoo::PerlMod::Version::Env - Get/parse settings from %ENV =head1 VERSION -version 0.7.1 +version 0.8.0 =head1 FUNCTIONS diff --git a/lib/Gentoo/PerlMod/Version/Error.pm b/lib/Gentoo/PerlMod/Version/Error.pm index ef82d7c..ca8acd5 100644 --- a/lib/Gentoo/PerlMod/Version/Error.pm +++ b/lib/Gentoo/PerlMod/Version/Error.pm @@ -4,7 +4,7 @@ use warnings; package Gentoo::PerlMod::Version::Error; -our $VERSION = '0.7.1'; +our $VERSION = '0.8.0'; # ABSTRACT: Various error message and diagnostic bits. @@ -189,7 +189,7 @@ Gentoo::PerlMod::Version::Error - Various error message and diagnostic bits. =head1 VERSION -version 0.7.1 +version 0.8.0 =head1 FUNCTIONS diff --git a/maint/fatpack.pl b/maint/fatpack.pl new file mode 100644 index 0000000..37297db --- /dev/null +++ b/maint/fatpack.pl @@ -0,0 +1,77 @@ +#!/usr/bin/env perl +# FILENAME: fatpack.pl +# CREATED: 07/17/15 08:20:40 by Kent Fredric (kentnl) +# ABSTRACT: Fatpacks Gentoo::PerlMod::Version + +use strict; +use warnings; + +use App::FatPacker; +use Path::Tiny qw( path ); +use Test::TempDir::Tiny qw( tempdir ); +use Perl::Strip; + +my $dir = tempdir(); +my $fatlib = path( $dir, 'fatlib' )->absolute; +my $thinlib = path( $dir, 'lib' )->absolute; + +$fatlib->mkpath; +$thinlib->mkpath; + +my $packer = App::FatPacker->new(); +my $root = path(__FILE__)->parent->parent; + +my $file = $root->child( 'maint', 'gentoo-perlmod-version.pl' ); +my $target = $root->child( 'bin', 'gentoo-perlmod-version.pl' ); +my $srclib = $root->child('lib'); + +my $transformer = Perl::Strip->new( optimize_size => 0, keep_nl => 1 ); +print "Generating a stripped lib in $thinlib\n"; +$srclib->visit( + sub { + my ( $path, $state ) = @_; + return if $path->is_dir; + my $rpath = $path->relative($srclib); + my $target = $rpath->absolute($thinlib); + $target->parent->mkpath; + $target->spew_raw( $transformer->strip( $path->slurp_raw ) ); + print "cp:strip $path $target\n"; + }, + { recurse => 1 } +); +my (@pack) = qw( + Sub/Exporter/Progressive.pm +); + +print "Resolving packlists\n"; +my (@packlists) = $packer->packlists_containing( \@pack ); + +print "Creating fatlib\n"; +$packer->packlists_to_tree( "$fatlib", \@packlists ); + +print "Stripping fatlib\n"; +$fatlib->visit( + sub { + my ( $path, $state ) = @_; + return if $path->is_dir; + $path->spew_raw( $transformer->strip( $path->slurp_raw ) ); + print "strip $path\n"; + }, + { recurse => 1 } +); + +print "Packing Script\n"; +my $shebang = ""; +my $script = ""; +if ( defined $file and -r $file ) { + ( $shebang, $script ) = $packer->load_main_script($file); +} + +my (@dirs) = map { $_->absolute->stringify } $fatlib, $thinlib; + +my %files; +$packer->collect_files( $_, \%files ) for @dirs; + +my $content = join "\n", $shebang, "## no critic", $packer->fatpack_code( \%files ), "## use critic", $script; + +$target->spew_raw($content); diff --git a/maint/gentoo-perlmod-version.pl b/maint/gentoo-perlmod-version.pl new file mode 100644 index 0000000..89903b7 --- /dev/null +++ b/maint/gentoo-perlmod-version.pl @@ -0,0 +1,111 @@ +#!/usr/bin/env perl +use 5.006; +use strict; +use warnings; + +package Gentoo::PerlMod::Version::Tool; + +our $VERSION = '0.8.0'; + +# PODNAME: gentoo-perlmod-version.pl + +# ABSTRACT: Command line utility for translating CPAN versions to Gentoo equivalents. + +# AUTHORITY + +## no critic (ProhibitPunctuationVar) +use Gentoo::PerlMod::Version qw( gentooize_version ); +use Carp qw( croak ); + +for (@ARGV) { + if (/\A--?h/msx) { + die <<"EOF"; + + gentoo-perlmod-version.pl 1.4 1.5 1.6 + gentoo-perlmod-version.pl --lax=1 1.4_5 1.5_6 + gentoo-perlmod-version.pl --lax=2 1.4.DONTDOTHISPLEASE432 + + echo 1.4 | gentoo-perlmod-version.pl + echo 1.4-5 | gentoo-perlmod-version.pl --lax=1 + echo 1.4.NOOOOO | gentoo-perlmod-version.pl --lax=2 + + SOMEVAR="\$( gentoo-perlmod-version.pl --oneshot 1.4 )" + SOMEVAR="\$( gentoo-perlmod-version.pl --oneshot 1.4 1.5 )" # Invalid, dies + SOMEVAR="\$( gentoo-perlmod-version.pl --oneshot 1.4_5 )" # Invalid, dies + SOMEVAR="\$( gentoo-perlmod-version.pl --lax=1 --oneshot 1.4_5 )" # Ok + + +See perldoc for Gentoo::PerlMod::Version for more information. + + perldoc Gentoo::PerlMod::Version + +EOF + + } +} + +my $lax = 0; +my $oneshot = 0; + +for ( 0 .. $#ARGV ) { + next unless $ARGV[$_] =~ /\A--lax=(\d+)\z/msx; + $lax = 0 + $1; + splice @ARGV, $_, 1, (); + last; +} +for ( 0 .. $#ARGV ) { + next unless '--oneshot' eq $ARGV[$_]; + $oneshot = 1; + splice @ARGV, $_, 1, (); + last; +} + +if ($oneshot) { + croak 'Too many versions given to --oneshot mode' if $#ARGV > 0; + my $v = gentooize_version( $ARGV[0], { lax => $lax } ); + print $v or croak "Print Error $!"; + exit 0; +} + +if (@ARGV) { + for (@ARGV) { + map_version( $_, $lax ); + } +} +else { + while (<>) { + chomp; + map_version( $_, $lax ); + } +} + +sub map_version { + my ( $version, $laxness ) = @_; + print "$version => " . gentooize_version( $version, { lax => $laxness } ) or croak "Print error $!"; + print "\n" or croak "Print error $!"; + return; +} + +1; + +=head1 SYNOPSIS + + gentoo-perlmod-version.pl 1.4 1.5 1.6 + gentoo-perlmod-version.pl --lax=1 1.4_5 1.5_6 + gentoo-perlmod-version.pl --lax=2 1.4.DONTDOTHISPLEASE432 + + echo 1.4 | gentoo-perlmod-version.pl + echo 1.4-5 | gentoo-perlmod-version.pl --lax=1 + echo 1.4.NOOOOO | gentoo-perlmod-version.pl --lax=2 + + SOMEVAR="$( gentoo-perlmod-version.pl --oneshot 1.4 )" + SOMEVAR="$( gentoo-perlmod-version.pl --oneshot 1.4 1.5 )" # Invalid, dies + SOMEVAR="$( gentoo-perlmod-version.pl --oneshot 1.4_5 )" # Invalid, dies + SOMEVAR="$( gentoo-perlmod-version.pl --lax=1 --oneshot 1.4_5 )" # Ok + + +See C for L<< C documentation|Gentoo::PerlMod::Version >> for more information. + + perldoc Gentoo::PerlMod::Version + +=cut diff --git a/maint/perlcritic.rc.gen.pl b/maint/perlcritic.rc.gen.pl index f7c5fc2..e576149 100644 --- a/maint/perlcritic.rc.gen.pl +++ b/maint/perlcritic.rc.gen.pl @@ -33,6 +33,7 @@ $bundle->remove_policy('ErrorHandling::RequireUseOfExceptions'); $bundle->remove_policy('CodeLayout::RequireUseUTF8'); $bundle->remove_policy('ValuesAndExpressions::RequireNumericVersion'); +$bundle->remove_policy('Miscellanea::ProhibitUnrestrictedNoCritic'); #$bundle->remove_policy('ErrorHandling::RequireCarping'); $bundle->remove_policy('NamingConventions::Capitalization'); diff --git a/misc/Changes.deps b/misc/Changes.deps index c0a56ac..ebde171 100644 --- a/misc/Changes.deps +++ b/misc/Changes.deps @@ -1,6 +1,8 @@ This file contains changes in REQUIRED dependencies for standard CPAN phases (configure/build/runtime/test) -0.7.1 +0.8.0 + +0.7.1 2015-06-23T03:30:53Z [Added / configure requires] - perl 5.006 diff --git a/misc/Changes.deps.all b/misc/Changes.deps.all index e1a2499..475c089 100644 --- a/misc/Changes.deps.all +++ b/misc/Changes.deps.all @@ -1,6 +1,17 @@ This file contains ALL changes in dependencies in both REQUIRED / OPTIONAL dependencies for all phases (configure/build/runtime/test/develop) -0.7.1 +0.8.0 + [Added / develop requires] + - Dist::Zilla::Plugin::Author::KENTNL::CONTRIBUTING 0.001003 + - Dist::Zilla::Plugin::RemovePrereqs::Provided + + [Changed / develop suggests] + - Dist::Zilla::PluginBundle::Author::KENTNL 2.024002 → 2.025001 + + [Removed / develop requires] + - Dist::Zilla::Plugin::Test::MinimumVersion + +0.7.1 2015-06-23T03:30:53Z [Added / configure requires] - perl 5.006 diff --git a/misc/Changes.deps.dev b/misc/Changes.deps.dev index 1f68ac9..e22cf29 100644 --- a/misc/Changes.deps.dev +++ b/misc/Changes.deps.dev @@ -1,6 +1,17 @@ This file contains changes to DEVELOPMENT dependencies only ( both REQUIRED and OPTIONAL ) -0.7.1 +0.8.0 + [Added / develop requires] + - Dist::Zilla::Plugin::Author::KENTNL::CONTRIBUTING 0.001003 + - Dist::Zilla::Plugin::RemovePrereqs::Provided + + [Changed / develop suggests] + - Dist::Zilla::PluginBundle::Author::KENTNL 2.024002 → 2.025001 + + [Removed / develop requires] + - Dist::Zilla::Plugin::Test::MinimumVersion + +0.7.1 2015-06-23T03:30:53Z [Added / develop recommends] - Test::More 0.99 diff --git a/misc/Changes.deps.opt b/misc/Changes.deps.opt index a903ed8..4151d0f 100644 --- a/misc/Changes.deps.opt +++ b/misc/Changes.deps.opt @@ -1,6 +1,8 @@ This file contains changes in OPTIONAL dependencies for standard CPAN phases (configure/build/runtime/test) -0.7.1 +0.8.0 + +0.7.1 2015-06-23T03:30:53Z [Changed / configure recommends] - ExtUtils::MakeMaker 6.98 → 7.00 diff --git a/misc/built_with.json b/misc/built_with.json index 4b4bdd2..5498dec 100644 --- a/misc/built_with.json +++ b/misc/built_with.json @@ -5,7 +5,8 @@ "Data::Dumper" : "2.158", "Dist::Zilla" : "5.037", "Dist::Zilla::App::Command::bakeini" : "0.002005", - "Dist::Zilla::Plugin::Author::KENTNL::RecommendFixes" : "0.004003", + "Dist::Zilla::Plugin::Author::KENTNL::CONTRIBUTING" : "0.001004", + "Dist::Zilla::Plugin::Author::KENTNL::RecommendFixes" : "0.005001", "Dist::Zilla::Plugin::Author::KENTNL::TravisCI" : "0.001002", "Dist::Zilla::Plugin::Authority" : "1.009", "Dist::Zilla::Plugin::AutoPrereqs" : "5.037", @@ -41,23 +42,23 @@ "Dist::Zilla::Plugin::Prereqs::Upgrade" : "0.001000", "Dist::Zilla::Plugin::Readme::Brief" : "0.002005", "Dist::Zilla::Plugin::ReadmeAnyFromPod" : "0.150250", + "Dist::Zilla::Plugin::RemovePrereqs::Provided" : "0.001000", "Dist::Zilla::Plugin::RewriteVersion::Sanitized" : "0.001005", "Dist::Zilla::Plugin::RunExtraTests" : "0.027", "Dist::Zilla::Plugin::Test::CPAN::Changes" : "0.009", "Dist::Zilla::Plugin::Test::Compile::PerFile" : "0.003000", "Dist::Zilla::Plugin::Test::EOL" : "0.18", "Dist::Zilla::Plugin::Test::Kwalitee" : "2.11", - "Dist::Zilla::Plugin::Test::MinimumVersion" : "2.000006", "Dist::Zilla::Plugin::Test::Perl::Critic" : "3.000", "Dist::Zilla::Plugin::Test::ReportPrereqs" : "0.021", "Dist::Zilla::Plugin::TestRelease" : "5.037", "Dist::Zilla::Plugin::Twitter" : "0.026", "Dist::Zilla::Plugin::UploadToCPAN" : "5.037", - "Dist::Zilla::PluginBundle::Author::KENTNL" : "2.024002", + "Dist::Zilla::PluginBundle::Author::KENTNL" : "2.025001", "ExtUtils::MakeMaker" : "7.04_01", "File::Spec" : "3.56", "Pod::Coverage::TrustPod" : "0.100003", - "Scalar::Util" : "1.42", + "Scalar::Util" : "1.42_002", "Sub::Exporter::Progressive" : "0.001011", "Test::CPAN::Changes" : "0.400002", "Test::CPAN::Meta" : "0.25", @@ -87,5 +88,5 @@ "osname" : "linux" }, "platform" : "linux", - "uname" : "Linux 4.0.0-gentoo x86_64 GenuineIntel GNU/Linux" + "uname" : "Linux 4.1.0-gentoo-r1 x86_64 GenuineIntel GNU/Linux" } diff --git a/perlcritic.rc b/perlcritic.rc index 12a8388..842539b 100644 --- a/perlcritic.rc +++ b/perlcritic.rc @@ -217,7 +217,7 @@ allowed_pragmata = diagnostics feature perlversion strict warnings utf8 [Miscellanea::ProhibitTies] -[Miscellanea::ProhibitUnrestrictedNoCritic] +[-Miscellanea::ProhibitUnrestrictedNoCritic] [-Miscellanea::ProhibitUselessNoCritic] diff --git a/t/00-report-prereqs.dd b/t/00-report-prereqs.dd index d46d537..5e6810b 100644 --- a/t/00-report-prereqs.dd +++ b/t/00-report-prereqs.dd @@ -14,6 +14,7 @@ do { my $x = { }, 'requires' => { 'Dist::Zilla' => '5', + 'Dist::Zilla::Plugin::Author::KENTNL::CONTRIBUTING' => '0.001003', 'Dist::Zilla::Plugin::Author::KENTNL::RecommendFixes' => '0.004002', 'Dist::Zilla::Plugin::Author::KENTNL::TravisCI' => '0.001002', 'Dist::Zilla::Plugin::Authority' => '1.006', @@ -50,13 +51,13 @@ do { my $x = { 'Dist::Zilla::Plugin::Prereqs::Upgrade' => '0', 'Dist::Zilla::Plugin::Readme::Brief' => '0', 'Dist::Zilla::Plugin::ReadmeAnyFromPod' => '0', + 'Dist::Zilla::Plugin::RemovePrereqs::Provided' => '0', 'Dist::Zilla::Plugin::RewriteVersion::Sanitized' => '0', 'Dist::Zilla::Plugin::RunExtraTests' => '0', 'Dist::Zilla::Plugin::Test::CPAN::Changes' => '0', 'Dist::Zilla::Plugin::Test::Compile::PerFile' => '0', 'Dist::Zilla::Plugin::Test::EOL' => '0', 'Dist::Zilla::Plugin::Test::Kwalitee' => '0', - 'Dist::Zilla::Plugin::Test::MinimumVersion' => '0', 'Dist::Zilla::Plugin::Test::Perl::Critic' => '0', 'Dist::Zilla::Plugin::Test::ReportPrereqs' => '0', 'Dist::Zilla::Plugin::TestRelease' => '0', @@ -73,7 +74,7 @@ do { my $x = { }, 'suggests' => { 'Dist::Zilla::App::Command::bakeini' => '0.002005', - 'Dist::Zilla::PluginBundle::Author::KENTNL' => '2.024002' + 'Dist::Zilla::PluginBundle::Author::KENTNL' => '2.025001' } }, 'runtime' => { diff --git a/xt/release/minimum-version.t b/xt/release/minimum-version.t deleted file mode 100644 index d108c79..0000000 --- a/xt/release/minimum-version.t +++ /dev/null @@ -1,8 +0,0 @@ -#!perl - -use Test::More; - -eval "use Test::MinimumVersion"; -plan skip_all => "Test::MinimumVersion required for testing minimum versions" - if $@; -all_minimum_version_from_metayml_ok();