summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUtkarsh Gupta <guptautkarsh2102@gmail.com>2019-08-03 12:54:16 +0530
committerUtkarsh Gupta <guptautkarsh2102@gmail.com>2019-08-03 12:54:16 +0530
commit06bd20b59fb8a8b67777fa394b7e91f139e3982d (patch)
tree7fdeca766e5899962bfe9375789ebc94c0455d41
parent1efb533a676a91751b494b1e1e85fa2542e22d66 (diff)
New upstream version 0.21
-rw-r--r--Changes3
-rw-r--r--META.json6
-rw-r--r--META.yml4
-rw-r--r--Makefile.PL2
-rw-r--r--README9
-rw-r--r--dist.ini3
-rw-r--r--lib/Dist/Zilla/Plugin/OurPkgVersion.pm21
-rw-r--r--t/author-pod-spell.t1
8 files changed, 38 insertions, 11 deletions
diff --git a/Changes b/Changes
index 24070f1..8e0af92 100644
--- a/Changes
+++ b/Changes
@@ -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--)
diff --git a/META.json b/META.json
index 167e3fd..5b6f52a 100644
--- a/META.json
+++ b/META.json
@@ -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"
}
diff --git a/META.yml b/META.yml
index 361aa56..1272dfc 100644
--- a/META.yml
+++ b/META.yml
@@ -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"
}
diff --git a/README b/README
index a93bd05..d0be360 100644
--- a/README
+++ b/README
@@ -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
diff --git a/dist.ini b/dist.ini
index 6b34ebe..97e1300 100644
--- a/dist.ini
+++ b/dist.ini
@@ -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