From: Jakub Narebski <jnareb@gmail.com>
To: Charles Bailey <charles@hashpling.org>
Cc: git@vger.kernel.org
Subject: Re: [RFC/PATCH] gitweb: Use list form of 'open "-|"' pipeline
Date: Sat, 8 Mar 2008 19:29:45 +0100 [thread overview]
Message-ID: <200803081929.46306.jnareb@gmail.com> (raw)
In-Reply-To: <20080308175106.GA13855@hashpling.org>
On Sat, 8 Mar 2008, Charles Bailey wrote:
> On Sat, Mar 08, 2008 at 05:57:20PM +0100, Jakub Narebski wrote:
>> Add output_pipeline subroutine, which allows to use list form of
>> pipeline; instead of
>>
>> open my $fh, "-|", "cmd_1 option | cmd_2 argument"
>>
>> we can now write
>>
>> my $fh = output_pipeline(['cmd_1', 'option'], ['cmd_2', 'argument']);
>>
>> which allows to avoid troubles with shell quoting, and avoid spawning
>> shell. Code is based on snippet http://www.perlmonks.org/?node_id=246397
>> simplified a bit.
>
> I'm not a Perl open expert, and I don't know if gitweb has other
> issues on windows anyway, but the list time I experimented with it
> neither the open( FHAND, "-|" ) trick, not the list form of open in
> combination with the "-|" mode worked at all on windows.
First, gitweb is git web interface; I don't know if anybody tried for
example to run gitweb on Windows, be it from Apache or from IIS.
Second, it probably depends on the flavour (distribution) of Perl
used. ActiveState Perl requires some horrible workarounds[*1*], I don't
know what about MSys / MinGW Perl, Cygwin Perl, or Vanilla / Strawberry
Perl.
[*1*] Git.pm, Perl interface to the Git, includes workaround for
ActiveState Perl sheningans; gitweb currently doesn't use Git.pm
(Git.pm would need some extensions), but perhaps it should. On the
other hand it would make installation slightly more complicated.
--
Jakub Narebski
Poland
next prev parent reply other threads:[~2008-03-08 18:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-08 16:57 [RFC/PATCH] gitweb: Use list form of 'open "-|"' pipeline Jakub Narebski
2008-03-08 17:51 ` Charles Bailey
2008-03-08 18:29 ` Jakub Narebski [this message]
2008-03-11 9:01 ` Frank Lichtenheld
2008-03-11 17:30 ` Jakub Narebski
2008-03-11 18:59 ` Frank Lichtenheld
2008-03-12 2:09 ` Jay Soffian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200803081929.46306.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=charles@hashpling.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).