Thu Jun 17 09:39:42 2004RSOD [...] cpan.org - Ticket created
To:
bug-HTTP-Proxy [...] rt.cpan.org
From:
Richard Soderberg <rsod [...] cpan.org>
Subject:
0.13 doesn't call $io->syswrite properly in t/22_connect.t
Date:
Thu, 17 Jun 2004 06:39:38 -0700
t/23connect.........usage: $io->syswrite(BUF, LEN [, OFFSET]) at
/Users/coral/.cpanplus/5.8.1/build/HTTP-Proxy-0.13/blib/lib/HTTP/
Proxy.pm line 763
# Failed test (t/23connect.t at line 45)
# Failed test (t/23connect.t at line 46)
# got: ''
- R.
Thu Jun 17 09:44:16 2004RSOD [...] cpan.org - Correspondence added
To fix, change line 763 to:
$peer->syswrite($data, length $data);
- R.
Thu Jun 17 12:17:20 2004book [...] cpan.org - Correspondence added
RT-Send-CC:
book [...] cpan.org
[RSOD - Thu Jun 17 09:39:42 2004]:
Show quoted text
> t/23connect.........usage: $io->syswrite(BUF, LEN [, OFFSET]) at
> /Users/coral/.cpanplus/5.8.1/build/HTTP-Proxy-0.13/blib/lib/HTTP/
This is strange, my version of IO::Handle says:
$io->syswrite ( BUF, [LEN, [OFFSET]] )
So the LEN argument should be optionnal.
Fri Jun 18 06:01:43 2004book [...] cpan.org - Correspondence added
RT-Send-CC:
book [...] cpan.org
[RSOD - Thu Jun 17 15:47:57 2004]:
Show quoted text
>
> So it seems that the fact that I'm using OS X 10.3.4's stock,
> shipping-to-everyone Perl 5.8.1-RC3 is relevant, at this point.
Please look at :
http://public.activestate.com/cgi-bin/perlbrowse?file=ext%2FIO%2Flib%2FIO%2FHandle.pm&blame=1http://search.cpan.org/src/JHI/perl-5.8.1/ext/IO/lib/IO/Handle.pm
See also:
http://public.activestate.com/cgi-bin/perlbrowse?patch=3825
sub syswrite {
- @_ == 3 || @_ == 4 or croak 'usage: $io->syswrite(BUF, LEN [,
OFFSET])';
+ @_ >= 2 && @_ <= 4 or croak 'usage: $io->syswrite(BUF [, LEN [,
OFFSET]])';
+ $_[2] = length($_[1]) unless defined $_[2];
syswrite($_[0], $_[1], $_[2], $_[3] || 0);
}
This line hasn't changed in the Perl source code since 1999.
It looks like the test script was run with an older version of
IO::Handle. Probably not the stock one distributed with OS X.
(I had someone run the test script on OS X 10.3.4 with Perl 5.8.1-RC3
and all tests did pass)
What version of IO::Handle do you have? And what is the path to it?
Which one was used to run the test suite?
Thanks for your time and patience.
BooK
Mon Mar 20 16:01:12 2006book [...] cpan.org - Status changed from 'new' to 'rejected'