Skip to content

Commit

Permalink
Build results of 7084d30 (on master)
Browse files Browse the repository at this point in the history
  • Loading branch information
kentfredric committed Mar 5, 2017
1 parent 1ed09e6 commit d38198a
Show file tree
Hide file tree
Showing 11 changed files with 176 additions and 18 deletions.
4 changes: 2 additions & 2 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Release history for Gentoo-PerlMod-Version

v0.8.1 2017-03-05T10:08:22Z 97853a6
v0.8.1 2017-03-05T10:57:15Z 7084d30
[Bugfix]
- Fix test problems with -Ddefault_inc_excludes_dot
- Closes https://github.com/kentnl/Gentoo-PerlMod-Version/issues/1

[Dependencies::Stats]
- Dependencies changed since 0.8.0, see misc/*.deps* for details
- develop: +2 ↑2 (suggests: ↑2)
- develop: +8 ↑2 (recommends: +1, suggests: ↑2)

[Misc]
- Version scheme now includes a "v" due to upstream tooling constraints
Expand Down
29 changes: 28 additions & 1 deletion META.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@
},
"develop" : {
"recommends" : {
"Path::Tiny" : "0.058",
"Test::More" : "0.99"
},
"requires" : {
"App::FatPacker" : "0",
"Dist::Zilla" : "5",
"Dist::Zilla::Plugin::Author::KENTNL::CONTRIBUTING" : "0.001003",
"Dist::Zilla::Plugin::Author::KENTNL::RecommendFixes" : "0.004002",
Expand All @@ -38,6 +40,7 @@
"Dist::Zilla::Plugin::ConfirmRelease" : "0",
"Dist::Zilla::Plugin::CopyFilesFromBuild" : "0",
"Dist::Zilla::Plugin::ExecDir" : "0",
"Dist::Zilla::Plugin::FileFinder::ByName" : "0",
"Dist::Zilla::Plugin::Git::Check" : "0",
"Dist::Zilla::Plugin::Git::Commit" : "0",
"Dist::Zilla::Plugin::Git::CommitBuild" : "0",
Expand Down Expand Up @@ -68,6 +71,7 @@
"Dist::Zilla::Plugin::ReadmeAnyFromPod" : "0",
"Dist::Zilla::Plugin::RemovePrereqs::Provided" : "0",
"Dist::Zilla::Plugin::RewriteVersion::Sanitized" : "0",
"Dist::Zilla::Plugin::Run::AfterBuild" : "0",
"Dist::Zilla::Plugin::RunExtraTests" : "0",
"Dist::Zilla::Plugin::Test::CPAN::Changes" : "0",
"Dist::Zilla::Plugin::Test::Compile::PerFile" : "0.003902",
Expand All @@ -79,6 +83,8 @@
"Dist::Zilla::Plugin::Twitter" : "0",
"Dist::Zilla::Plugin::UploadToCPAN" : "0",
"English" : "0",
"Path::Tiny" : "0",
"Perl::Strip" : "0",
"Pod::Coverage::TrustPod" : "0",
"Software::License::Perl_5" : "0",
"Test::CPAN::Changes" : "0.19",
Expand All @@ -87,7 +93,8 @@
"Test::Kwalitee" : "1.21",
"Test::More" : "0.96",
"Test::Pod" : "1.41",
"Test::Pod::Coverage" : "1.08"
"Test::Pod::Coverage" : "1.08",
"Test::TempDir::Tiny" : "0"
},
"suggests" : {
"Dist::Zilla::App::Command::bakeini" : "0.002006",
Expand Down Expand Up @@ -157,6 +164,25 @@
"version" : "5.025010"
},
"plugins" : [
{
"class" : "Dist::Zilla::Plugin::Run::AfterBuild",
"config" : {
"Dist::Zilla::Plugin::Run::Role::Runner" : {
"fatal_errors" : 1,
"quiet" : 0,
"run" : [
"perl maint/fatpack.pl %d"
]
}
},
"name" : "Run::AfterBuild",
"version" : "0.043"
},
{
"class" : "Dist::Zilla::Plugin::FileFinder::ByName",
"name" : "ExtraFiles",
"version" : "6.009"
},
{
"class" : "Dist::Zilla::Plugin::MetaConfig",
"name" : "@Author::KENTNL/MetaConfig",
Expand Down Expand Up @@ -434,6 +460,7 @@
"config" : {
"Dist::Zilla::Plugin::PodWeaver" : {
"finder" : [
"ExtraFiles",
":InstallModules",
":ExecFiles"
],
Expand Down
25 changes: 22 additions & 3 deletions bin/gentoo-perlmod-version.pl
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ 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='v0.8.1';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;
use 5.006;use strict;use warnings;package Gentoo::PerlMod::Version;our$VERSION='v0.8.1';our$AUTHORITY='cpan:KENTNL';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='v0.8.1';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;
use 5.006;use strict;use warnings;package Gentoo::PerlMod::Version::Env;our$VERSION='v0.8.1';our$AUTHORITY='cpan:KENTNL';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='v0.8.1';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;
use 5.006;use strict;use warnings;package Gentoo::PerlMod::Version::Error;our$VERSION='v0.8.1';our$AUTHORITY='cpan:KENTNL';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';
Expand Down Expand Up @@ -185,6 +185,25 @@ =head1 SYNOPSIS
perldoc Gentoo::PerlMod::Version
=head1 NAME
gentoo-perlmod-version.pl - Command line utility for translating CPAN versions to Gentoo equivalents.
=head1 VERSION
version v0.8.1
=head1 AUTHOR
Kent Fredric <kentnl@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2017 by Kent Fredric <kentnl@cpan.org>.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=head1 AUTHOR
Kent Fredric <kentnl@cpan.org>
Expand Down
16 changes: 16 additions & 0 deletions dist.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,24 @@
; vim: syntax=dosini
; Uncomment this to bootstrap via self
; [Bootstrap::lib]
; Weirdly placed because it has to run before all the other
; after-builders
; authordep Perl::Strip
; authordep App::FatPacker
; authordep Path::Tiny
; authordep Test::TempDir::Tiny
name = Gentoo-PerlMod-Version
author = Kent Fredric <kentnl@cpan.org>
license = Perl_5
copyright_holder = Kent Fredric <kentnl@cpan.org>

[Run::AfterBuild]
run = perl maint/fatpack.pl %d

[FileFinder::ByName / ExtraFiles]
dir = maint
match = /gentoo-perlmod-version\.pl$

[MetaConfig / @Author::KENTNL/MetaConfig]

[GithubMeta / @Author::KENTNL/GithubMeta]
Expand Down Expand Up @@ -86,6 +99,9 @@ mantissa = 6
normal_form = normal

[PodWeaver / @Author::KENTNL/PodWeaver]
finder = ExtraFiles
finder = :InstallModules
finder = :ExecFiles
replacer = replace_with_blank

[AutoPrereqs / @Author::KENTNL/AutoPrereqs]
Expand Down
18 changes: 18 additions & 0 deletions dist.ini.meta
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ copyright_holder = Kent Fredric <kentnl@cpan.org>
; Uncomment this to bootstrap via self
; [Bootstrap::lib]

; Weirdly placed because it has to run before all the other
; after-builders

; authordep Perl::Strip
; authordep App::FatPacker
; authordep Path::Tiny
; authordep Test::TempDir::Tiny
[Run::AfterBuild]
run = perl maint/fatpack.pl %d

[FileFinder::ByName / ExtraFiles]
dir = maint
match = /gentoo-perlmod-version\.pl$

[@Author::KENTNL]
bumpversions = 1
normal_form = normal
Expand All @@ -17,8 +31,12 @@ srcreadme = mkdn
twitter_extra_hash_tags = #gentoo
AutoPrereqs.finder = :InstallModules
MinimumPerl.runtime_finder = :InstallModules
PodWeaver.finder[0] = ExtraFiles
PodWeaver.finder[1] = :InstallModules
PodWeaver.finder[2] = :ExecFiles
-remove = Test::MinimumVersion


;version_major = 0
;version_minor = 1
; the following data denotes when this minor was minted
Expand Down
Loading

0 comments on commit d38198a

Please sign in to comment.