diff options
author | Utkarsh Gupta <guptautkarsh2102@gmail.com> | 2019-08-03 12:54:16 +0530 |
---|---|---|
committer | Utkarsh Gupta <guptautkarsh2102@gmail.com> | 2019-08-03 12:54:16 +0530 |
commit | 06bd20b59fb8a8b67777fa394b7e91f139e3982d (patch) | |
tree | 7fdeca766e5899962bfe9375789ebc94c0455d41 | |
parent | 1efb533a676a91751b494b1e1e85fa2542e22d66 (diff) |
New upstream version 0.21
-rw-r--r-- | Changes | 3 | ||||
-rw-r--r-- | META.json | 6 | ||||
-rw-r--r-- | META.yml | 4 | ||||
-rw-r--r-- | Makefile.PL | 2 | ||||
-rw-r--r-- | README | 9 | ||||
-rw-r--r-- | dist.ini | 3 | ||||
-rw-r--r-- | lib/Dist/Zilla/Plugin/OurPkgVersion.pm | 21 | ||||
-rw-r--r-- | t/author-pod-spell.t | 1 |
8 files changed, 38 insertions, 11 deletions
@@ -1,5 +1,8 @@ Revision history for Dist-Zilla-Plugin-OurPkgVersion +0.21 2019-07-18 + - Add no_critic option (gh#18) + 0.20 2019-05-24 - Fix git deploy snafoo (plicease--) @@ -88,7 +88,7 @@ "web" : "https://github.com/plicease/dist-zilla-plugin-ourpkgversion" } }, - "version" : "0.20", + "version" : "0.21", "x_contributors" : [ "Alceu Rodrigues de Freitas Junior <alceu.junior@quintoandar.com.br>", "Alceu Rodrigues de Freitas Junior <arfreitas@cpan.org>", @@ -105,7 +105,7 @@ "Michael Jemmeson <mjemmeson@cpan.org>", "Stephan Loyd <stephanloyd9@gmail.com>" ], - "x_generated_by_perl" : "v5.30.0", - "x_serialization_backend" : "Cpanel::JSON::XS version 4.11" + "x_generated_by_perl" : "v5.28.1", + "x_serialization_backend" : "Cpanel::JSON::XS version 4.12" } @@ -38,7 +38,7 @@ resources: bugtracker: https://github.com/plicease/dist-zilla-plugin-ourpkgversion/issues homepage: https://metacpan.org/dist/Dist-Zilla-Plugin-OurPkgVersion repository: git://github.com/plicease/dist-zilla-plugin-ourpkgversion.git -version: '0.20' +version: '0.21' x_contributors: - 'Alceu Rodrigues de Freitas Junior <alceu.junior@quintoandar.com.br>' - 'Alceu Rodrigues de Freitas Junior <arfreitas@cpan.org>' @@ -54,5 +54,5 @@ x_contributors: - 'Michael Conrad <mike@nrdvana.net>' - 'Michael Jemmeson <mjemmeson@cpan.org>' - 'Stephan Loyd <stephanloyd9@gmail.com>' -x_generated_by_perl: v5.30.0 +x_generated_by_perl: v5.28.1 x_serialization_backend: 'YAML::Tiny version 1.73' diff --git a/Makefile.PL b/Makefile.PL index 4f7dab5..e477f20 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -68,7 +68,7 @@ my %WriteMakefileArgs = ( "Test::Exception" => 0, "Test::Version" => "0.04" }, - "VERSION" => "0.20", + "VERSION" => "0.21", "test" => { "TESTS" => "t/*.t" } @@ -5,7 +5,7 @@ NAME VERSION - version 0.20 + version 0.21 SYNOPSIS @@ -187,6 +187,13 @@ PROPERTIES Currently, the value must be a single Perl token such as a string or number. + no_critic + + When underscore_eval_version is used the generated code for dev + versions may not technically be Perl::Critic compliant due to string + eval, but is nevertheless pretty safe. This option will add the + appropriate no critic directive to save you the hassle. + BUGS Please report any bugs or feature requests on the bugtracker website @@ -1,7 +1,7 @@ name = Dist-Zilla-Plugin-OurPkgVersion author = Caleb Cushing <xenoterracide@gmail.com> author = Grahan Ollis <plicease@cpan.org> -version = 0.20 +version = 0.21 license = Artistic_2_0 copyright_holder = Caleb Cushing @@ -84,6 +84,7 @@ stopwords = ini stopwords = executables stopwords = perltidy stopwords = FileFinder +stopwords = dev [@Git] tag_format = %v diff --git a/lib/Dist/Zilla/Plugin/OurPkgVersion.pm b/lib/Dist/Zilla/Plugin/OurPkgVersion.pm index 0f531ac..ff2280d 100644 --- a/lib/Dist/Zilla/Plugin/OurPkgVersion.pm +++ b/lib/Dist/Zilla/Plugin/OurPkgVersion.pm @@ -3,7 +3,7 @@ use 5.014; use strict; use warnings; -our $VERSION = '0.20'; # VERSION +our $VERSION = '0.21'; # VERSION use Moose; with ( @@ -46,6 +46,12 @@ has overwrite => ( default => 0, ); +has no_critic => ( + is => 'ro', + isa => 'Bool', + default => 0, +); + sub munge_files { my $self = shift; @@ -66,7 +72,7 @@ sub BUILD { return 1; } -sub munge_file { +sub munge_file { ## no critic (Subroutines::ProhibitExcessComplexity) my ( $self, $file ) = @_; if ( $file->name =~ m/\.pod$/ixms ) { @@ -135,6 +141,8 @@ sub munge_file { if ( $version =~ /_/ && $self->underscore_eval_version ) { my $eval = "\$VERSION = eval \$VERSION;"; + $eval .= " ## no critic (BuiltinFunctions::ProhibitStringyEval)" + if $self->no_critic; $code .= $_->line? "$eval\n" : "\n$eval"; } @@ -197,7 +205,7 @@ Dist::Zilla::Plugin::OurPkgVersion - No line insertion and does Package version =head1 VERSION -version 0.20 +version 0.21 =head1 SYNOPSIS @@ -381,6 +389,13 @@ still gets modified for trial releases) Currently, the value must be a single Perl token such as a string or number. +=item no_critic + +When C<underscore_eval_version> is used the generated code for dev versions +may not technically be L<Perl::Critic> compliant due to string eval, but is +nevertheless pretty safe. This option will add the appropriate C<no critic> +directive to save you the hassle. + =back =head1 BUGS diff --git a/t/author-pod-spell.t b/t/author-pod-spell.t index 553a65e..175d5df 100644 --- a/t/author-pod-spell.t +++ b/t/author-pod-spell.t @@ -55,6 +55,7 @@ alexchorny arfreitas dagolden de +dev dzil executables git |