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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Aug 30, 2008 at 11:06:06AM -0700, Junio C Hamano wrote:

> > 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux