git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Fix git-remote for ActiveState Perl

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 22, 2007, 20:19 UTC
Message-ID
<7vr6lviapf.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20070822161307.GA3528@steel.home>
Alex Riesen <raa.lkml@gmail.com> writes:
> For reason unknown a package in ActiveState Perl 5.8.7 must implement
> READLINE method differently for scalar and array context. The code
> tested to work for more sane and recent version of perl (5.8.8 shipped
> with Ubuntu), so maybe it was always a requirement.
Well spotted.

Unfortunately, the manual perltie.pod is very sketchy on this issue, and only says:

    This method will be called when the handle is read from via <HANDLE>.
    The method should return undef when there is no more data.

The default implementation in Tie::StdHandle (Tie/Handle.pm) does agree with you by doing this:

    sub READLINE { my $fh = $_[0]; <$fh> }
So I am fairly confident that your patch is the right fix.

Interestingly, CPAN::Tarzip::READLINE (CPAN.pm) gets it wrong ;-) and caters only to calls in scalar context if I am reading the code correctly.

Thanks.  Will apply.
Previous: Alex Riesen
Message 2 of 2 in “Fix git-remote for ActiveState Perl”
  1. Fix git-remote for ActiveState PerlAlex Riesen, Aug 22, 2007
  2. Junio C HamanoAug 22, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.