* Minimum Perl version? @ 2010-09-24 10:00 Tait 2010-09-24 10:23 ` Ævar Arnfjörð Bjarmason 2010-09-24 10:27 ` Tor Arntsen 0 siblings, 2 replies; 10+ messages in thread From: Tait @ 2010-09-24 10:00 UTC (permalink / raw) To: git What is the minimum Perl version git expects to support? I ask, because f922df8... seems to have introduced a open() syntax that is not compatible with some older Perl versions. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Minimum Perl version? 2010-09-24 10:00 Minimum Perl version? Tait @ 2010-09-24 10:23 ` Ævar Arnfjörð Bjarmason 2010-09-24 20:40 ` Tait 2010-09-24 10:27 ` Tor Arntsen 1 sibling, 1 reply; 10+ messages in thread From: Ævar Arnfjörð Bjarmason @ 2010-09-24 10:23 UTC (permalink / raw) To: Tait; +Cc: git, David Aguilar On Fri, Sep 24, 2010 at 10:00, Tait <git.git@t41t.com> wrote: > > What is the minimum Perl version git expects to support? > > I ask, because f922df8... seems to have introduced a open() syntax that > is not compatible with some older Perl versions. We generally support 5.6 or above, but 5.8 or above for some other programs. As far as I can tell there was no new open syntax introduced in that series that wasn't supported before. What specifically is breaking for you, and on what perl version? ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Minimum Perl version? 2010-09-24 10:23 ` Ævar Arnfjörð Bjarmason @ 2010-09-24 20:40 ` Tait 2010-09-24 22:39 ` Ævar Arnfjörð Bjarmason 0 siblings, 1 reply; 10+ messages in thread From: Tait @ 2010-09-24 20:40 UTC (permalink / raw) To: git; +Cc: Ævar Arnfjörð Bjarmason, David Aguilar > > What is the minimum Perl version git expects to support? > > > > I ask, because f922df8... seems to have introduced a open() syntax that > > is not compatible with some older Perl versions. > > We generally support 5.6 or above, but 5.8 or above for some other > programs. I am having to use a system with 5.6.1 to do cvsimport and cvsexportcommit, and interactive add. I haven't tried sendmail or other functions, yet. This system was previously using git 1.6.5.something, and did not have these problems as of that release, but now that I'm building git 1.7.3, they have appeared. Perl 5.6.1 doesn't support the list open syntax, so one must replace open(my $fh, '-|', @list) with open(my $fh, '-|'), and then exec(@list). I'm working up a patch set to fill my own needs on this system, but based on the subsequent discussion about setting 5.8 as the minimum, it sounds like it's not worth submitting. Thanks. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Minimum Perl version? 2010-09-24 20:40 ` Tait @ 2010-09-24 22:39 ` Ævar Arnfjörð Bjarmason 2010-09-26 10:22 ` Andreas Ericsson 0 siblings, 1 reply; 10+ messages in thread From: Ævar Arnfjörð Bjarmason @ 2010-09-24 22:39 UTC (permalink / raw) To: Tait; +Cc: git, David Aguilar On Fri, Sep 24, 2010 at 20:40, Tait <git.git@t41t.com> wrote: >> > What is the minimum Perl version git expects to support? >> > >> > I ask, because f922df8... seems to have introduced a open() syntax that >> > is not compatible with some older Perl versions. >> >> We generally support 5.6 or above, but 5.8 or above for some other >> programs. > > I am having to use a system with 5.6.1 to do cvsimport and cvsexportcommit, > and interactive add. I haven't tried sendmail or other functions, yet. This > system was previously using git 1.6.5.something, and did not have these > problems as of that release, but now that I'm building git 1.7.3, they > have appeared. Maybe marking everything as needing 5.8 or later isn't the right thing to do. E.g. the git-*cvs*.perl code mostly isn't touched, but cvsexportcommit does use Git.pm, so that would also need to be pinned at 5.6 if cvsexportcommit was. > Perl 5.6.1 doesn't support the list open syntax, so one must replace > open(my $fh, '-|', @list) with open(my $fh, '-|'), and then exec(@list). > I'm working up a patch set to fill my own needs on this system, but based > on the subsequent discussion about setting 5.8 as the minimum, it sounds > like it's not worth submitting. The issue isn't that we don't have a workaround for individual bits like open(my $fh, '-|', @list), but rather that keeping all of the code 5.6 compatible is a burden on ongoing maintenance for a very marginal benefit. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Minimum Perl version? 2010-09-24 22:39 ` Ævar Arnfjörð Bjarmason @ 2010-09-26 10:22 ` Andreas Ericsson 0 siblings, 0 replies; 10+ messages in thread From: Andreas Ericsson @ 2010-09-26 10:22 UTC (permalink / raw) To: Ævar Arnfjörð Bjarmason; +Cc: Tait, git, David Aguilar On 09/25/2010 12:39 AM, Ævar Arnfjörð Bjarmason wrote: > On Fri, Sep 24, 2010 at 20:40, Tait<git.git@t41t.com> wrote: >>>> What is the minimum Perl version git expects to support? >>>> >>>> I ask, because f922df8... seems to have introduced a open() syntax that >>>> is not compatible with some older Perl versions. >>> >>> We generally support 5.6 or above, but 5.8 or above for some other >>> programs. >> >> I am having to use a system with 5.6.1 to do cvsimport and cvsexportcommit, >> and interactive add. I haven't tried sendmail or other functions, yet. This >> system was previously using git 1.6.5.something, and did not have these >> problems as of that release, but now that I'm building git 1.7.3, they >> have appeared. > > Maybe marking everything as needing 5.8 or later isn't the right thing > to do. E.g. the git-*cvs*.perl code mostly isn't touched, but > cvsexportcommit does use Git.pm, so that would also need to be pinned > at 5.6 if cvsexportcommit was. > >> Perl 5.6.1 doesn't support the list open syntax, so one must replace >> open(my $fh, '-|', @list) with open(my $fh, '-|'), and then exec(@list). >> I'm working up a patch set to fill my own needs on this system, but based >> on the subsequent discussion about setting 5.8 as the minimum, it sounds >> like it's not worth submitting. > > The issue isn't that we don't have a workaround for individual bits > like open(my $fh, '-|', @list), but rather that keeping all of the > code 5.6 compatible is a burden on ongoing maintenance for a very > marginal benefit. If someone steps up and makes various snippets of code 5.6 compatible while not introducing any penalties for 5.8 users, I see no reason to drop those patches. Tait, submit your patches and I'm sure they'll be reviewed the same as everything else. If they make the code a lot harder to understand or a lot slower, I'm sure they'll be dropped. If they don't, I'm reasonably certain Junio will take them on. I barely speak Perl though, so reviewing them will have to be done by someone else. -- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Minimum Perl version? 2010-09-24 10:00 Minimum Perl version? Tait 2010-09-24 10:23 ` Ævar Arnfjörð Bjarmason @ 2010-09-24 10:27 ` Tor Arntsen 2010-09-24 11:05 ` Ævar Arnfjörð Bjarmason 1 sibling, 1 reply; 10+ messages in thread From: Tor Arntsen @ 2010-09-24 10:27 UTC (permalink / raw) To: Tait; +Cc: git On Fri, Sep 24, 2010 at 12:00, Tait <git.git@t41t.com> wrote: > > What is the minimum Perl version git expects to support? > > I ask, because f922df8... seems to have introduced a open() syntax that > is not compatible with some older Perl versions. 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. -Tor ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Minimum Perl version? 2010-09-24 10:27 ` Tor Arntsen @ 2010-09-24 11:05 ` Ævar Arnfjörð Bjarmason 2010-09-24 11:22 ` Tor Arntsen 0 siblings, 1 reply; 10+ messages in thread From: Ævar Arnfjörð Bjarmason @ 2010-09-24 11:05 UTC (permalink / raw) To: Tor Arntsen; +Cc: Tait, git On Fri, Sep 24, 2010 at 10:27, Tor Arntsen <tor@spacetec.no> wrote: > On Fri, Sep 24, 2010 at 12:00, Tait <git.git@t41t.com> wrote: >> >> What is the minimum Perl version git expects to support? >> >> I ask, because f922df8... seems to have introduced a open() syntax that >> is not compatible with some older Perl versions. > > 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` ? ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Minimum Perl version? 2010-09-24 11:05 ` Ævar Arnfjörð Bjarmason @ 2010-09-24 11:22 ` Tor Arntsen 2010-09-24 12:30 ` Alex Riesen 0 siblings, 1 reply; 10+ messages in thread From: Tor Arntsen @ 2010-09-24 11:22 UTC (permalink / raw) To: Ævar Arnfjörð Bjarmason; +Cc: Tait, git 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: [..] >> 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 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Minimum Perl version? 2010-09-24 11:22 ` Tor Arntsen @ 2010-09-24 12:30 ` Alex Riesen 2010-09-24 12:42 ` Tor Arntsen 0 siblings, 1 reply; 10+ messages in thread From: Alex Riesen @ 2010-09-24 12:30 UTC (permalink / raw) To: Tor Arntsen; +Cc: Ævar Arnfjörð Bjarmason, Tait, git On Fri, Sep 24, 2010 at 13:22, Tor Arntsen <tor@spacetec.no> wrote: >> 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't use an undefined value as filehandle reference at test-pl.pl line 5. > (that's the 'open' line) Maybe it is not the syntax (the separate argument for open mode in this case), but the initialization of $fh to 'undef' which is the problem here? ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Minimum Perl version? 2010-09-24 12:30 ` Alex Riesen @ 2010-09-24 12:42 ` Tor Arntsen 0 siblings, 0 replies; 10+ messages in thread From: Tor Arntsen @ 2010-09-24 12:42 UTC (permalink / raw) To: Alex Riesen; +Cc: Ævar Arnfjörð Bjarmason, Tait, git On Fri, Sep 24, 2010 at 14:30, Alex Riesen <raa.lkml@gmail.com> wrote: > Maybe it is not the syntax (the separate argument for open mode > in this case), but the initialization of $fh to 'undef' which is the > problem here? That's correct, I believe, but I also think the underlying problem here is having support for dynamic filehandles which can be exported. You could assign something to $fh and then call open(), but that won't give you what the code asks for. It should in principle be possible to replace my $fh = undef; open ($fh..) with use FileHandle; my $fh = new FileHandle (...) etc. which works also on Perl 5.6. When I first ran into this I did a little bit of hacking in that direction, but I didn't make a full effort and didn't get it to work - in the meantime the customer system which required perl 5.6 (for performance reasons) migrated to a later version of AIX and I was then free to upgrade the perl version to 5.8 on this (my maintance copy of their system), in other words I wasn't affected by the problem anymore and abandoned what I had started working on. -Tor ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-09-26 10:22 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-09-24 10:00 Minimum Perl version? Tait 2010-09-24 10:23 ` Ævar Arnfjörð Bjarmason 2010-09-24 20:40 ` Tait 2010-09-24 22:39 ` Ævar Arnfjörð Bjarmason 2010-09-26 10:22 ` Andreas Ericsson 2010-09-24 10:27 ` Tor Arntsen 2010-09-24 11:05 ` Ævar Arnfjörð Bjarmason 2010-09-24 11:22 ` Tor Arntsen 2010-09-24 12:30 ` Alex Riesen 2010-09-24 12:42 ` Tor Arntsen
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).