Subject: | RSH-Logging should not require Test::Pod & Test::Perl::Critic |
Test::Pod & Test::Perl::Critic are listed as a mandatory modules for building RSH::Logging. The
distribution works fine without them, but is difficult to install as both 'perl Makefile.PL' & 'make
test' attempt to install them for you if you are doing automated installs:
AUTOMATED_TESTING=1 perl Makefile.PL
*** Module::AutoInstall version 1.03
...
- Test::Pod ...missing.
- Test::Perl::Critic ...missing.
...
==> Auto-install the 1 mandatory module(s) from CPAN? [Y/n] y
*** Dependencies will be installed the next time you type 'make'.
(You may need to do that as the 'root' user.)
...
The attached patch makes these modules optional. It also adds Test::Pod::Coverage, which
looked to be missing.
Subject: | RSH-Logging-0.4.1-optional-deps.patch |
diff -ruN RSH-Logging-0.4.1.orig/Makefile.PL RSH-Logging-0.4.1/Makefile.PL
--- RSH-Logging-0.4.1.orig/Makefile.PL 2007-12-03 12:32:29.000000000 -0500
+++ RSH-Logging-0.4.1/Makefile.PL 2013-03-11 15:13:52.000000000 -0400
@@ -9,8 +9,10 @@
requires 'Text::SimpleTable';
requires 'Time::HiRes';
build_requires 'Test::More';
-build_requires 'Test::Pod';
-build_requires 'Test::Perl::Critic';
+
+recommends 'Test::Pod';
+recommends 'Test::Pod::Coverage';
+recommends 'Test::Perl::Critic';
install_script glob('script/*.pl');
diff -ruN RSH-Logging-0.4.1.orig/t/999.perlcritic.t RSH-Logging-0.4.1/t/999.perlcritic.t
--- RSH-Logging-0.4.1.orig/t/999.perlcritic.t 2007-12-03 12:32:29.000000000 -0500
+++ RSH-Logging-0.4.1/t/999.perlcritic.t 2013-03-11 15:13:28.000000000 -0400
@@ -1,16 +1,9 @@
#!perl
use Test::More;
-
-if (!require Test::Perl::Critic) {
- Test::More::plan(
- skip_all => "Test::Perl::Critic required for testing PBP compliance"
- );
-}
-
-Test::More::plan(
- skip_all => "Not worrying about perl critic right now."
-);
+eval "use Test::Perl::Critic";
+plan skip_all => "Test::Perl::Critic required for testing PBP compliance" if $@;
+plan skip_all => "Not worrying about perl critic right now.";
#Test::Perl::Critic::all_critic_ok();