in reply to Careful with Test::Pod::Coverage

Actually, for those of us who support 'deep' backwards compatibility for their modules, Test::More itself is problematic. If you blindly 'use' it, you can break 5.005 compatibility for people running very old installations that lack Test::More.

Since I wasn't specifically aware of the 'misversioned dependancy' problem with Test::Pod::Coverage, I have not yet written defensive code for it. I have written defensive code for Test::More (example taken from my Class::NamedParms module):

use strict; use lib ('./blib','../blib', './lib', '../lib'); eval { require Test::More; }; if ($@) { $|++; print "1..0 # Skipped: Test::More required for testing POD coverag +e\n"; exit; } eval { require Test::Pod::Coverage; }; if ($@ or (not defined $Test::Pod::Coverage::VERSION) or ($Test::Pod:: +Coverage::VERSION < 1.06)) { Test::More::plan (skip_all => "Test::Pod::Coverage 1.06 required f +or testing POD coverage"); exit; } Test::More::plan (tests => 1); Test::Pod::Coverage::pod_coverage_ok( 'Class::NamedParms', { also_priv +ate => ['DEBUG'] });

Replies are listed 'Best First'.
Re^2: Careful with Test::Pod::Coverage. And with Test::More
by chromatic (Archbishop) on Nov 14, 2005 at 19:33 UTC

    Surely the solution is to mark Test::More as a dependency in your installer. It only became a core module in Perl 5.8.0, though it's also core in Perl 5.6.2 now.

      If only life were that simple. Automatic installation of dependancies didn't get added to CPAN until early in 1999. 5.005 came out in mid-1998. Therefore, although modern CPAN can automatically install dependancies, old perl installs don't necessarily take advantage of it because their installed versions of CPAN may be too old.

        I wonder whether someone running software that old would even be interested in automatic dependency resolution. I figure if they’ve not upgraded in such a long time, it must be because stability is so important to them that they are quite willing to endure the pain of installing complex software by hand – along with all the other tradeoffs that come with running nearly decade-old software.

        In other words, I’ll make a token effort to not make deployment on such systems gratuitously difficult, but I also don’t see why I should make my own software development gratuitously difficult. There is a balance to be struck; abstaining from all progress is not it.

        Makeshifts last the longest.