develooper Front page | perl.perl5.porters | Postings from April 2013

[perl #117791] IO::Handle POD misleading about write

Thread Next
James E Keenan via RT
April 28, 2013 23:31
[perl #117791] IO::Handle POD misleading about write
Message ID:
On Sun Apr 28 14:18:35 2013, dom wrote:
> This is a bug report for perl from,
> generated with the help of perlbug 1.39 running under perl 5.14.2.
> -----------------------------------------------------------------
> From <>
> "IO::Handle(3perl) writes:
>   $io->write ( BUF, LEN [, OFFSET ] )
>       This "write" is like "write" found in C, that is it is the
>    opposite
>       of read. The wrapper for the perl "write" function is called
>    "for-
>       mat_write".
> I think 'like "write"' is far from the truth. The actual code is just
> a simple PERL "print" statement instead of "syswrite". This means that
> the return value is always 1 (in case of success) instead of the
> number of actually written bytes as a programmer could expect.
> A big warning required here in the man page:
> "This is just a wrapper around print. A C like "write" is "syswrite".
> Gabor"
> Patch attached. Please leave feedback on the ticket, and I will commit
> this to blead post-freeze.

+1 overall, but I would change:

function always returns 1


function upon success always returns C<1>

Thank you very much.
Jim Keenan

via perlbug:  queue: perl5 status: new

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About