1

I found a bug in the Perl module IO::Socket::SSL and I could probably fix it, however, I'm concerned about testing the fix. I downloaded the source package from Debian (as my intend is to produce a Debian package or a patch for that) and looked at the t/ directory. There, I found the test coverage is scarce at best.

So I'd like to ask if there is a well known procedure for testing this code. Is there another test (not in the distribution) with better coverage? Also, I would like to use testing modules not in the core distribution (Test::LeakTrace) for testing. Would that be OK?

Cœur
  • 37,241
  • 25
  • 195
  • 267
jpalecek
  • 47,058
  • 7
  • 102
  • 144
  • I expect using a package not in the core distribution would be fine if the tests fail non-obtrusively when the package isn't available.... – sarnold Feb 17 '12 at 01:12
  • 1
    Did you find a bug in IO::Socket::SSL, or in the version Debian ships? If you haven't already, it's worth checking on CPAN (and possibly the source repository, if it's public) to see if it's already been fixed. In that case, you can either back-port the patch, or see about updating the package in Debian. – kbenson Feb 17 '12 at 01:18
  • 1
    You have not found a bug in Perl. You have found a bug in a Perl module. One which isn't part of the core. – Brad Gilbert Feb 17 '12 at 23:27

1 Answers1

8

A quick CPAN search indicates that IO::Socket::SSL is on CPAN. Furthermore, corelist (http://perldoc.perl.org/corelist.html) as of 5.14.1 doesn't report knowing about it, so it is not distributed with core Perl. So, to your questions.

First, CPAN tells me that Steffen Ullrich is still the author and maintainer of the module and although the documentation states a copyright as of 2005, his latest CPAN release is as of 2011. If you're not using Debian Sid, there is a decent chance that he has fixed your problem but it has not yet been repackaged for Debian. Before you do anything, you should try to get a hold of the latest sources. You can do this by downloading a copy of the tarball from CPAN. (Many modules maintain source control on GitHub and there may be more recent developments than the CPAN tarball, but Steffen has not told us where to find them, so we'll just have to start there.) The full test suite should be in this tarball.

The procedure, which you probably know, is to first build the source:

perl Makefile.PL
make

then running the test suite:

make test

If the tests do not cover what you need, you should update the tests and email Steffen (his email and a website are available on the author's page). He will likely have ideas for how to best supply a patch with tests.

I believe that CPAN is there and should be used, so if it were up to me, I would say that you should use Test::LeakTrace and specify it as a build dependency. However, Steffen may feel differently, so you should talk with him about it.

Hope that helps! Good luck!

cjm
  • 61,471
  • 9
  • 126
  • 175
David Mertens
  • 1,037
  • 8
  • 12
  • http://stackoverflow.com/questions/1094125/try-to-use-module-in-perl-and-print-message-if-module-not-available should be useful input on this. Just use Test::More's skip() in conjunction with it. – Joe McMahon Feb 18 '12 at 00:14