Posted on 2006-02-07 17:10:11-08 by raysim
Reference arg in call to threads::shared::share in ithread_dispatcher
(Reposted with line breaks fixed)
The problem is at line 660, the call to threads::shared::share.
654 sub ithread_dispatcher {
655 require threads;
656 require threads::shared;
657
658 my $nchildren = 0;
659
660 threads::shared::share(\$nchildren);
661
662 sub {
663 my $this = shift;
664 my $lsocket = shift;
665 my $handler = shift;
666 my $maxchildren = $this->get_max_interpreters();
667
668 my $siginfo = exists($SIG{INFO}) ? 'INFO' : 'USR1';
669 local $SIG{$siginfo} = sub {
670 warn "Number of active children: $nchildren\n";
671 };
Perl apparently expects a scalar, array or hash (but not a reference) there:
root@ns1$ PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/li +b', 'blib/arch')" t/*.t
t/00_pmilter....# Failed test (t/00_pmilter.t at line 14)
# Tried to use 'Sendmail::PMilter'.
# Error: Type of arg 1 to threads::shared::share must be one of [$@%] (not single ref constru +ctor) at /var/tmp/spfmilter/Sendmail-PMilter-0.95/blib/lib/Sendmail/PMilter.pm line 660, near "$nc +hildren)"
# Compilation failed in require at (eval 1) line 2.
t/00_pmilter....ok 55/55# Looks like you failed 1 tests of 55.
t/00_pmilter....dubious
Test returned status 1 (wstat 256, 0x100)
Scalar found where operator expected at (eval 152) line 1, near "'int' $__val"
(Missing operator before $__val?)
DIED. FAILED test 1
Failed 1/55 tests, 98.18% okay
t/01_milter.....ok
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/00_pmilter.t 1 256 55 1 1.82% 1
Failed 1/2 test scripts, 50.00% okay. 1/85 subtests failed, 98.82% okay.
perl version is 5.8.3-18
I don't see any mention of others having this problem. Am I missing something?
Ray Simard rhs.techlists@sylvan-glade.com
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.