Mail::Ezmlm:
* updated version info for v0.08.2 * improved testing script
This commit is contained in:
parent
27afb0aea4
commit
ec43298706
3 changed files with 31 additions and 5 deletions
|
@ -57,5 +57,8 @@ Revision history for Perl extension Mail::Ezmlm.
|
||||||
- add modules Mail::Ezmlm::GpgKeyRing and Mail::Ezmlm::GpgEzmlm
|
- add modules Mail::Ezmlm::GpgKeyRing and Mail::Ezmlm::GpgEzmlm
|
||||||
|
|
||||||
0.08.1 Thu Oct 12 04:37:06 CEST 2008
|
0.08.1 Thu Oct 12 04:37:06 CEST 2008
|
||||||
- fix issue of Mail::Ezmlm::GpgEzmlm with ezmlm-idx v0.4x lists
|
- fixed issues of Mail::Ezmlm::GpgEzmlm with ezmlm-idx v0.4x lists
|
||||||
|
|
||||||
|
0.08.2 Wed Oct 15 23:00:12 CEST 2008
|
||||||
|
- added check for external dependency to the test script
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# ===========================================================================
|
# ===========================================================================
|
||||||
# Ezmlm.pm - version 0.08.1 - 10/12/2008
|
# Ezmlm.pm - version 0.08.2 - 10/15/2008
|
||||||
# $Id$
|
# $Id$
|
||||||
#
|
#
|
||||||
# Object methods for ezmlm mailing lists
|
# Object methods for ezmlm mailing lists
|
||||||
|
@ -53,7 +53,7 @@ require Exporter;
|
||||||
@EXPORT = qw(
|
@EXPORT = qw(
|
||||||
|
|
||||||
);
|
);
|
||||||
$VERSION = '0.08.1';
|
$VERSION = '0.08.2';
|
||||||
|
|
||||||
require 5.005;
|
require 5.005;
|
||||||
|
|
||||||
|
@ -708,6 +708,8 @@ sub errno {
|
||||||
}
|
}
|
||||||
|
|
||||||
# == Test the compatiblity of the module ==
|
# == Test the compatiblity of the module ==
|
||||||
|
# return 0 for a valid version
|
||||||
|
# return the version string for an invalid version
|
||||||
sub check_version {
|
sub check_version {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $version = `$EZMLM_BASE/ezmlm-make -V 2>&1`;
|
my $version = `$EZMLM_BASE/ezmlm-make -V 2>&1`;
|
||||||
|
|
|
@ -31,6 +31,25 @@ print "Loading: ok 1\n";
|
||||||
|
|
||||||
use Cwd;
|
use Cwd;
|
||||||
use File::Find;
|
use File::Find;
|
||||||
|
|
||||||
|
# we need to check, if ezmlm-idx is installed
|
||||||
|
sub check_external_dependency {
|
||||||
|
my $ezmlm_bin = $Mail::Ezmlm::EZMLM_BASE . "/ezmlm-make";
|
||||||
|
if (-x $ezmlm_bin) {
|
||||||
|
return (0==0);
|
||||||
|
} else {
|
||||||
|
return (0==1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!check_external_dependency()) {
|
||||||
|
# For humans:
|
||||||
|
warn "You don't have ezmlm-idx installed. Please fetch it from "
|
||||||
|
. "http://ezmlm.org/ and install it.";
|
||||||
|
# For the tester scripts:
|
||||||
|
exit 0;
|
||||||
|
}
|
||||||
|
|
||||||
$list = new Mail::Ezmlm;
|
$list = new Mail::Ezmlm;
|
||||||
|
|
||||||
# create a temp directory if necessary
|
# create a temp directory if necessary
|
||||||
|
@ -122,8 +141,10 @@ unless(@subscribers) {
|
||||||
}
|
}
|
||||||
|
|
||||||
print 'Testing installed version of ezmlm: ';
|
print 'Testing installed version of ezmlm: ';
|
||||||
my($version) = $list->check_version();
|
my $version = $list->check_version();
|
||||||
if ($version) {
|
# "check_version" returns zero for a valid version and the version string for an
|
||||||
|
# invalid version of ezmlm
|
||||||
|
if ($version != 0) {
|
||||||
$version =~ s/\n//;
|
$version =~ s/\n//;
|
||||||
print 'not ok 9 [Warning: Ezmlm.pm is designed to work with ezmlm-idx > 0.40. Your version reports as: ', $version, "]\n";
|
print 'not ok 9 [Warning: Ezmlm.pm is designed to work with ezmlm-idx > 0.40. Your version reports as: ', $version, "]\n";
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue