[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debianizing Filter::Crypto::Decrypt

On Wed, Nov 11, 2009 at 03:45:11PM -0800, C.J. Adams-Collier wrote:
On Wed, 2009-11-11 at 22:34 +0000, Steve Hay wrote:

Btw, regarding your fix for the POD test failures, I'd like to do something about this. I've just got two FAIL reports in from CPAN Testers regarding this bug. Both are on Debian:

http://nntp.x.perl.org/group/perl.cpan.testers/5926663 http://nntp.x.perl.org/group/perl.cpan.testers/5916199

I think the easiest thing to do would be to skip the test concerned when running on Debian with Pod::Perldoc's VERSION (and/or perldoc's VERSION if it has one) less than a certain value, or failing that, just skip it when the Debian version is level than a certain value. Can you tell me what the appropriate version(s) are that I'd need to skip the test on?

The perl-doc package diverts /usr/bin/perldoc to /usr/bin/perldoc.stub when it is installed, so you could use something like this:

$ echo '$x = "is not"; $x = "is" if -e q{/usr/bin/perldoc.stub}; print "perl-doc $x installed\n"' > /tmp/foo;\
perl /tmp/foo &&\
sudo apt-get -y install perl-doc >/dev/null 2>&1 ;\
perl /tmp/foo
perl-doc is not installed
perl-doc is installed

All Debian-based hosts have a file /etc/debian_version, so
-e /etc/debian_version will be enough to know if you're on a system
where you should determine whether you should check
for /usr/bin/perldoc.stub.  Maybe something like the attached?

If you want a less distro-specific testing method (even if the results is perhaps distro-specific) then perhaps use lsb_release instead (contained in lsb-base in Debian) which on Debian queries the content of /etc/debian_version.

 - Jonas

* Jonas Smedegaard - idealist & Internet-arkitekt
* Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

Attachment: signature.asc
Description: Digital signature

Reply to: