Skip to Content.
Sympa Menu

devel - [sympa-developpers] oddity in Sympa::Mail

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: Guillaume Rousse <address@concealed>
  • To: address@concealed
  • Subject: [sympa-developpers] oddity in Sympa::Mail
  • Date: Mon, 24 Mar 2014 14:43:51 +0100

my $max_arg = eval { POSIX::_SC_ARG_MAX; };
if ($EVAL_ERROR) {
$max_arg = 4096;
printf STDERR Sympa::Language::gettext(
"Your system does not conform to the POSIX P1003.1 standard, or\nyour Perl system does not define the _SC_ARG_MAX constant in its POSIX\nlibrary. You must modify the smtp.pm module in order to set a value\nfor variable %s.\n"
), $max_arg;
} else {
$max_arg = POSIX::sysconf($max_arg);
}

This would be a bit more readable as:

my $max_arg;
eval {
$max_arg = POSIX::sysconf( &POSIX::_SC_ARG_MAX );
};
if (EVAL_ERROR) {
printf STDERR Sympa::Language::gettext(
"Your system does not conform to the POSIX P1003.1 standard, or your Perl system does not define the _SC_ARG_MAX constant in its POSIX library. You must modify the Sympa::Mail module in order to set a value for variable \$max_arg\n");
}

Or even better, just using a default value instead of trying to have the user modify a source file:

my $max_arg;
eval {
$max_arg = POSIX::sysconf( &POSIX::_SC_ARG_MAX );
};
if (EVAL_ERROR) {
$max_arg = 4096;
}

However, it is really needed at all ? Do we really have non-POSIX system out there, matching minimal requirements to run Sympa ?

--
Guillaume Rousse
INRIA, Direction des systèmes d'information
Domaine de Voluceau
Rocquencourt - BP 105
78153 Le Chesnay
Tel: 01 39 63 58 31

Attachment: smime.p7s
Description: Signature cryptographique S/MIME



  • [sympa-developpers] oddity in Sympa::Mail, Guillaume Rousse, 03/24/2014

Archive powered by MHonArc 2.6.19+.

Top of Page