Subject: | patch to fix POSIX::_SC_OPEN_MAX build failure |
I was experiencing a bug when using this module, version .09:
" Bareword "POSIX::_SC_OPEN_MAX" not allowed while "strict subs" in use at /usr/local/lib/perl5/site_perl/5.8.0/GnuPG.pm line 267."
The attached patch fixes the bug which appears to be causes several cases of the breakage reported in CPAN Testers. I'm using Perl 5.8.0 on FreeBSD 4.5.
--- /usr/local/lib/perl5/site_perl/5.005/GnuPG.pm Fri Jun 8 11:28:53 2001
+++ GnuPG.pm Tue Jul 30 15:31:28 2002
@@ -264,7 +264,7 @@
# some ends must be closed in the child.
#
# Besides this is just plain good hygiene
- my $max_fd = POSIX::sysconf( POSIX::_SC_OPEN_MAX ) || 256;
+ my $max_fd = POSIX::sysconf( POSIX::_SC_OPEN_MAX() ) || 256;
foreach my $f ( 3 .. $max_fd ) {
next if $f == fileno $self->{status_fd};
POSIX::close( $f );