[perl-Test-Assert] Tweak the perlcritic test, which has discovered something to moan about

Paul Howarth pghmcfc at fedoraproject.org
Fri Jun 21 13:34:51 UTC 2013


commit 00930bf58a8324de7458570addd15453c9425f1c
Author: Paul Howarth <paul at city-fan.org>
Date:   Fri Jun 21 14:31:27 2013 +0100

    Tweak the perlcritic test, which has discovered something to moan about

 Test-Assert-0.0504-Critic.patch |   10 ++++++++++
 perl-Test-Assert.spec           |   14 +++++++++++++-
 2 files changed, 23 insertions(+), 1 deletions(-)
---
diff --git a/Test-Assert-0.0504-Critic.patch b/Test-Assert-0.0504-Critic.patch
new file mode 100644
index 0000000..a569e02
--- /dev/null
+++ b/Test-Assert-0.0504-Critic.patch
@@ -0,0 +1,10 @@
+--- lib/Test/Assert.pm
++++ lib/Test/Assert.pm
+@@ -124,6 +124,7 @@
+     }, @names);
+ };
+ 
++## no critic (ProhibitBuiltinHomonyms)
+ 
+ # Disable debug mode
+ sub unimport {
diff --git a/perl-Test-Assert.spec b/perl-Test-Assert.spec
index 86487a5..040b316 100644
--- a/perl-Test-Assert.spec
+++ b/perl-Test-Assert.spec
@@ -1,11 +1,12 @@
 Name:		perl-Test-Assert
 Version:	0.0504
-Release:	5%{?dist}
+Release:	6%{?dist}
 Summary:	Assertion methods for those who like JUnit
 License:	GPL+ or Artistic
 Group:		Development/Libraries
 URL:		http://search.cpan.org/dist/Test-Assert/
 Source0:	http://search.cpan.org/CPAN/authors/id/D/DE/DEXTER/Test-Assert-%{version}.tar.gz
+Patch0:		Test-Assert-0.0504-Critic.patch
 BuildArch:	noarch
 BuildRequires:	perl(Class::Inspector)
 BuildRequires:	perl(constant)
@@ -72,6 +73,9 @@ RELEASE_TESTS="$(echo $RELEASE_TESTS | sed 's|xt/copyright.t||')"
 # Don't run the spelling test yet as we need to add extra stopwords
 RELEASE_TESTS="$(echo $RELEASE_TESTS | sed 's|xt/pod_spell.t||')"
 
+# Don't run the perlcritic test yet as we need to patch the code
+RELEASE_TESTS="$(echo $RELEASE_TESTS | sed 's|xt/perlcritic.t||')"
+
 # Signature test would fail on recent distros due to presence of MYMETA.*
 [ -f MYMETA.yml ] && mv MYMETA.yml ..
 [ -f MYMETA.json ] && mv MYMETA.json ..
@@ -82,6 +86,11 @@ RELEASE_TESTS="$(echo $RELEASE_TESTS | sed 's|xt/pod_spell.t||')"
 [ -f ../MYMETA.yml ] && mv ../MYMETA.yml .
 [ -f ../MYMETA.json ] && mv ../MYMETA.json .
 
+# Patch the code to turn off one check before running the perlcritic test
+patch -p0 < %{P:0}
+./Build test --test_files xt/perlcritic.t
+patch -p0 -R < %{P:0}
+
 # Fix the POD Spell test and run it
 mv xt/pod_spellrc xt/pod_spellrc.orig
 (
@@ -104,6 +113,9 @@ cd -
 %{_mandir}/man3/Test::Assert.3pm*
 
 %changelog
+* Fri Jun 21 2013 Paul Howarth <paul at city-fan.org> - 0.0504-6
+- Tweak the perlcritic test, which has discovered something to moan about
+
 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.0504-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 



More information about the perl-devel mailing list