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

Re: [PATCH] change Perl syntax to support Perl 5.6

From
Jeff King <peff@peff.net>
Date
Aug 30, 2008, 18:13 UTC
Message-ID
<20080830181333.GA14893@coredump.intra.peff.net>
In-Reply-To
<7vwshygyy9.fsf@gitster.siamese.dyndns.org>
On Sat, Aug 30, 2008 at 11:06:06AM -0700, Junio C Hamano wrote:
Show 8 quoted lines
> > Won't this execute the command using the shell, which means that
> > metacharacters need to be escaped? I didn't try, but I'm pretty sure
> > this would break
> >
> >   git add -i "file with space"
> 
> I didn't try either but I think you are right.  And I agree we should say
> we rely on 5.6 or newer.
I did just try, and it is indeed broken.
> I thought gitweb folks are targetting 5.6.1 as the minimum for unicode
> support (Lea and Jakub Cc'ed)?
Has it been tested? I don't have perl 5.6 handy, but:
  $ man perl58delta | grep -A8 'list form of'
       ·   If your platform supports fork(), you can use the list form of
           "open" for pipes.  For example:
               open KID_PS, "-|", "ps", "aux" or die $!;
           forks the ps(1) command (without spawning a shell, as there are
           more than three arguments to open()), and reads its standard output
           via the "KID_PS" filehandle.  See perlipc.
  $ grep -- '-|' gitweb/gitweb.perl | head
        if (open my $fd, "-|", git_cmd(), "rev-parse", "--verify", "HEAD") {
        open my $fd, "-|", git_cmd(), "cat-file", '-t', $hash or return;
        open my $fh, "-|", git_cmd(), "config", '-z', '-l',
        open my $fd, "-|", git_cmd(), "ls-tree", $base, "--", $path
        open my $fd, "-|", git_cmd(), "ls-tree", '-r', '-t', '-z', $base
        open($fd, "-|", git_cmd(), 'for-each-ref',
        open my $fd, "-|", git_cmd(), "show-ref", "--dereference",
        open my $fd, "-|", git_cmd(), "name-rev", "--tags", $hash
        open my $fd, "-|", git_cmd(), "cat-file", "tag", $tag_id or return;
        open my $fd, "-|", git_cmd(), "rev-list",

So either I am misunderstanding something, or gitweb uses a construct that needs perl 5.8.

-Peff
Previous: Junio C HamanoNext: Robert Schiele
Message 4 of 29 in “change Perl syntax to support Perl 5.6”
  1. change Perl syntax to support Perl 5.6Robert Schiele, Aug 30, 2008
  2. Jeff KingAug 30, 2008
  3. Junio C HamanoAug 30, 2008
  4. Jeff KingAug 30, 2008
  5. Robert SchieleAug 30, 2008
  6. Jeff KingAug 30, 2008
  7. Jakub NarebskiAug 30, 2008
  8. Robert SchieleAug 30, 2008
  9. Avery PennarunAug 31, 2008
  10. Randal L. SchwartzAug 31, 2008
  11. Junio C HamanoAug 31, 2008
  12. Avery PennarunAug 31, 2008
  13. Jakub NarebskiAug 31, 2008
  14. Petr BaudisAug 31, 2008
  15. H. Peter AnvinSep 1, 2008
  16. Robert SchieleSep 1, 2008
  17. Tom G. ChristensenSep 1, 2008
  18. Brandon CaseySep 4, 2008
  19. Tom G. ChristensenSep 5, 2008
  20. Jakub NarebskiAug 31, 2008
  21. Jay SoffianSep 1, 2008
  22. Alex RiesenSep 1, 2008
  23. Avery PennarunSep 2, 2008
  24. Avery PennarunSep 2, 2008
  25. Junio C HamanoAug 30, 2008
  26. Randal L. SchwartzAug 31, 2008
  27. Ask Bjørn HansenAug 31, 2008
  28. Junio C HamanoSep 1, 2008
  29. Junio C HamanoSep 1, 2008

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.