Re: Minimum Perl version?
- From
- Tor Arntsen <tor@spacetec.no>
- Date
- Sep 24, 2010, 11:22 UTC
- Message-ID
- <AANLkTiknAw5DwEDHQVJs96gEShky3rLYjyqpQy3MY=8Z@mail.gmail.com>
- In-Reply-To
- <AANLkTimUE=hyJ-y_XzpvCokb77KvRGw3gnM+9Xxui9tG@mail.gmail.com>
On Fri, Sep 24, 2010 at 13:05, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
> On Fri, Sep 24, 2010 at 10:27, Tor Arntsen <tor@spacetec.no> wrote:
[..]
Show 21 quoted lines
>> I've found that for add -p you'll need 5.8.x or newer, due to stuff like
>>
>> my $fh = undef;
>> open($fh, '-|', @_) or die;
>>
>> which fails in e.g. perl 5.6.
>> There could be some other stuff (in addition to add -p) that also does
>> this kind of thing.
>
> If that's the case (I don't have a 5.6 here to do archeology on) then
> git add -p never worked in 5.6. That was added in 5cde71d6 when it was
> introduced in 2006:
>
> +sub run_cmd_pipe {
> + my $fh = undef;
> + open($fh, '-|', @_) or die;
> + return <$fh>;
> +}
>
> Can you show us the specific error you're getting, and the output of
> your `perl -V` ?I don't have that particular installation anymore (I installed perl 5.8 on the machine I had trouble with), and the only other system I have left with perl 5.6 only has an old Git 1.5 version. But it's easy enough to reproduce, Perl 5.6 simply doesn't support that notation. Put the code above in a perl script and execute it:
Can't use an undefined value as filehandle reference at test-pl.pl line 5. (that's the 'open' line)
I can provide the output of -V if you wish, but I don't think it matters really, except for the version:
"Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:".. I.e. perl 5.6.1. The above is from Irix, the original installation I ran Git on was AIX with Perl 5.6.1.
-Tor