{"thread":{"id":"25220","subject":"Minimum Perl version?","startedAt":"2010-09-24T10:00:19Z","lastAt":"2010-09-26T10:22:23Z","messageCount":10,"participants":["Tait","Ævar Arnfjörð Bjarmason","Tor Arntsen","Alex Riesen","Andreas Ericsson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"151457","messageId":"20100924100019.GT23563@ece.pdx.edu","threadId":"25220","inReplyTo":null,"subject":"Minimum Perl version?","fromName":"Tait","fromEmail":"git.git@t41t.com","sentAt":"2010-09-24T10:00:19Z","receivedAt":"2010-09-24T10:00:19Z","isPatch":false,"sender":{"key":"git.git@t41t.com","avatar":null},"body":"\nWhat is the minimum Perl version git expects to support?\n\nI ask, because f922df8... seems to have introduced a open() syntax that\nis not compatible with some older Perl versions.\n"},{"id":"151458","messageId":"AANLkTin_wrCnpz-fz=FuJ96j+xBHM1-5HTGG0vP7bmDY@mail.gmail.com","threadId":"25220","inReplyTo":"20100924100019.GT23563@ece.pdx.edu","subject":"Re: Minimum Perl version?","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-24T10:23:11Z","receivedAt":"2010-09-24T10:23:11Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Fri, Sep 24, 2010 at 10:00, Tait <git.git@t41t.com> wrote:\n>\n> What is the minimum Perl version git expects to support?\n>\n> I ask, because f922df8... seems to have introduced a open() syntax that\n> is not compatible with some older Perl versions.\n\nWe generally support 5.6 or above, but 5.8 or above for some other\nprograms.\n\nAs far as I can tell there was no new open syntax introduced in that\nseries that wasn't supported before.\n\nWhat specifically is breaking for you, and on what perl version?\n"},{"id":"151459","messageId":"AANLkTi=3xNSV0y-i=0KUSDRBJ8HmfSfGO7TBHTPiv_KM@mail.gmail.com","threadId":"25220","inReplyTo":"20100924100019.GT23563@ece.pdx.edu","subject":"Re: Minimum Perl version?","fromName":"Tor Arntsen","fromEmail":"tor@spacetec.no","sentAt":"2010-09-24T10:27:36Z","receivedAt":"2010-09-24T10:27:36Z","isPatch":false,"sender":{"key":"tor@spacetec.no","avatar":null},"body":"On Fri, Sep 24, 2010 at 12:00, Tait <git.git@t41t.com> wrote:\n>\n> What is the minimum Perl version git expects to support?\n>\n> I ask, because f922df8... seems to have introduced a open() syntax that\n> is not compatible with some older Perl versions.\n\nI've found that for add -p you'll need 5.8.x or newer, due to stuff like\n\n                my $fh = undef;\n                open($fh, '-|', @_) or die;\n\nwhich fails in e.g. perl 5.6.\nThere could be some other stuff (in addition to add -p) that also does\nthis kind of thing.\n\n-Tor\n"},{"id":"151463","messageId":"AANLkTimUE=hyJ-y_XzpvCokb77KvRGw3gnM+9Xxui9tG@mail.gmail.com","threadId":"25220","inReplyTo":"AANLkTi=3xNSV0y-i=0KUSDRBJ8HmfSfGO7TBHTPiv_KM@mail.gmail.com","subject":"Re: Minimum Perl version?","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-24T11:05:24Z","receivedAt":"2010-09-24T11:05:24Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Fri, Sep 24, 2010 at 10:27, Tor Arntsen <tor@spacetec.no> wrote:\n> On Fri, Sep 24, 2010 at 12:00, Tait <git.git@t41t.com> wrote:\n>>\n>> What is the minimum Perl version git expects to support?\n>>\n>> I ask, because f922df8... seems to have introduced a open() syntax that\n>> is not compatible with some older Perl versions.\n>\n> I've found that for add -p you'll need 5.8.x or newer, due to stuff like\n>\n>                my $fh = undef;\n>                open($fh, '-|', @_) or die;\n>\n> which fails in e.g. perl 5.6.\n> There could be some other stuff (in addition to add -p) that also does\n> this kind of thing.\n\nIf that's the case (I don't have a 5.6 here to do archeology on) then\ngit add -p never worked in 5.6. That was added in 5cde71d6 when it was\nintroduced in 2006:\n\n    +sub run_cmd_pipe {\n    +       my $fh = undef;\n    +       open($fh, '-|', @_) or die;\n    +       return <$fh>;\n    +}\n\nCan you show us the specific error you're getting, and the output of\nyour `perl -V` ?\n"},{"id":"151465","messageId":"AANLkTiknAw5DwEDHQVJs96gEShky3rLYjyqpQy3MY=8Z@mail.gmail.com","threadId":"25220","inReplyTo":"AANLkTimUE=hyJ-y_XzpvCokb77KvRGw3gnM+9Xxui9tG@mail.gmail.com","subject":"Re: Minimum Perl version?","fromName":"Tor Arntsen","fromEmail":"tor@spacetec.no","sentAt":"2010-09-24T11:22:15Z","receivedAt":"2010-09-24T11:22:15Z","isPatch":false,"sender":{"key":"tor@spacetec.no","avatar":null},"body":"On Fri, Sep 24, 2010 at 13:05, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:\n> On Fri, Sep 24, 2010 at 10:27, Tor Arntsen <tor@spacetec.no> wrote:\n[..]\n>> I've found that for add -p you'll need 5.8.x or newer, due to stuff like\n>>\n>>                my $fh = undef;\n>>                open($fh, '-|', @_) or die;\n>>\n>> which fails in e.g. perl 5.6.\n>> There could be some other stuff (in addition to add -p) that also does\n>> this kind of thing.\n>\n> If that's the case (I don't have a 5.6 here to do archeology on) then\n> git add -p never worked in 5.6. That was added in 5cde71d6 when it was\n> introduced in 2006:\n>\n>    +sub run_cmd_pipe {\n>    +       my $fh = undef;\n>    +       open($fh, '-|', @_) or die;\n>    +       return <$fh>;\n>    +}\n>\n> Can you show us the specific error you're getting, and the output of\n> your `perl -V` ?\n\nI don't have that particular installation anymore (I installed perl\n5.8 on the machine I had trouble with), and the only other system I\nhave left with perl 5.6 only has an old Git 1.5 version. But it's easy\nenough to reproduce, Perl 5.6 simply doesn't support that notation.\nPut the code above in a perl script and execute it:\n\nCan't use an undefined value as filehandle reference at test-pl.pl line 5.\n(that's the 'open' line)\n\nI can provide the output of -V if you wish, but I don't think it\nmatters really, except for the version:\n\n\"Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:\"..\nI.e. perl 5.6.1. The above is from Irix, the original installation I\nran Git on was AIX with Perl 5.6.1.\n\n-Tor\n"},{"id":"151471","messageId":"AANLkTimjMkJGw+Dh_x+TQUscC1tOV6kW=a6_57f2snnB@mail.gmail.com","threadId":"25220","inReplyTo":"AANLkTiknAw5DwEDHQVJs96gEShky3rLYjyqpQy3MY=8Z@mail.gmail.com","subject":"Re: Minimum Perl version?","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2010-09-24T12:30:48Z","receivedAt":"2010-09-24T12:30:48Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On Fri, Sep 24, 2010 at 13:22, Tor Arntsen <tor@spacetec.no> wrote:\n>> If that's the case (I don't have a 5.6 here to do archeology on) then\n>> git add -p never worked in 5.6. That was added in 5cde71d6 when it was\n>> introduced in 2006:\n>>\n>>    +sub run_cmd_pipe {\n>>    +       my $fh = undef;\n>>    +       open($fh, '-|', @_) or die;\n>>    +       return <$fh>;\n>>    +}\n>>\n>\n> Can't use an undefined value as filehandle reference at test-pl.pl line 5.\n> (that's the 'open' line)\n\nMaybe it is not the syntax (the separate argument for open mode\nin this case), but the initialization of $fh to 'undef' which is the\nproblem here?\n"},{"id":"151472","messageId":"AANLkTi=Q-xCu4TND877YBNOZXL3rBeU9fY6YY_9rA9j=@mail.gmail.com","threadId":"25220","inReplyTo":"AANLkTimjMkJGw+Dh_x+TQUscC1tOV6kW=a6_57f2snnB@mail.gmail.com","subject":"Re: Minimum Perl version?","fromName":"Tor Arntsen","fromEmail":"tor@spacetec.no","sentAt":"2010-09-24T12:42:32Z","receivedAt":"2010-09-24T12:42:32Z","isPatch":false,"sender":{"key":"tor@spacetec.no","avatar":null},"body":"On Fri, Sep 24, 2010 at 14:30, Alex Riesen <raa.lkml@gmail.com> wrote:\n\n> Maybe it is not the syntax (the separate argument for open mode\n> in this case), but the initialization of $fh to 'undef' which is the\n> problem here?\n\nThat's correct, I believe, but I also think the underlying problem here\nis having support for dynamic filehandles which can be exported.\nYou could assign something to $fh and then call open(), but that\nwon't give you what the code asks for.\n\nIt should in principle be possible to replace\n my $fh = undef;\n open ($fh..)\nwith\n use FileHandle;\n my $fh = new FileHandle (...)\netc.\nwhich works also on Perl 5.6.\n\nWhen I first ran into this I did a little bit of hacking in that\ndirection, but I didn't make a full effort and didn't get it to work -\nin the meantime the customer system which required perl 5.6 (for\nperformance reasons) migrated to a later version of AIX and I was then\nfree to upgrade the perl version to 5.8 on this (my maintance copy of\ntheir system), in other words I wasn't affected by the problem anymore\nand abandoned what I had started working on.\n\n-Tor\n"},{"id":"151544","messageId":"20100924204032.GU23563@ece.pdx.edu","threadId":"25220","inReplyTo":"AANLkTin_wrCnpz-fz=FuJ96j+xBHM1-5HTGG0vP7bmDY@mail.gmail.com","subject":"Re: Minimum Perl version?","fromName":"Tait","fromEmail":"git.git@t41t.com","sentAt":"2010-09-24T20:40:32Z","receivedAt":"2010-09-24T20:40:32Z","isPatch":false,"sender":{"key":"git.git@t41t.com","avatar":null},"body":"> > What is the minimum Perl version git expects to support?\n> >\n> > I ask, because f922df8... seems to have introduced a open() syntax that\n> > is not compatible with some older Perl versions.\n>\n> We generally support 5.6 or above, but 5.8 or above for some other\n> programs.\n\nI am having to use a system with 5.6.1 to do cvsimport and cvsexportcommit,\nand interactive add. I haven't tried sendmail or other functions, yet. This\nsystem was previously using git 1.6.5.something, and did not have these\nproblems as of that release, but now that I'm building git 1.7.3, they\nhave appeared.\n\nPerl 5.6.1 doesn't support the list open syntax, so one must replace\nopen(my $fh, '-|', @list) with open(my $fh, '-|'), and then exec(@list).\nI'm working up a patch set to fill my own needs on this system, but based\non the subsequent discussion about setting 5.8 as the minimum, it sounds\nlike it's not worth submitting.\n\nThanks.\n"},{"id":"151582","messageId":"AANLkTinQQxsbUHiKLaCJ0b5-dcvdE4JhLMVWOV5P2bkh@mail.gmail.com","threadId":"25220","inReplyTo":"20100924204032.GU23563@ece.pdx.edu","subject":"Re: Minimum Perl version?","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-24T22:39:32Z","receivedAt":"2010-09-24T22:39:32Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Fri, Sep 24, 2010 at 20:40, Tait <git.git@t41t.com> wrote:\n>> > What is the minimum Perl version git expects to support?\n>> >\n>> > I ask, because f922df8... seems to have introduced a open() syntax that\n>> > is not compatible with some older Perl versions.\n>>\n>> We generally support 5.6 or above, but 5.8 or above for some other\n>> programs.\n>\n> I am having to use a system with 5.6.1 to do cvsimport and cvsexportcommit,\n> and interactive add. I haven't tried sendmail or other functions, yet. This\n> system was previously using git 1.6.5.something, and did not have these\n> problems as of that release, but now that I'm building git 1.7.3, they\n> have appeared.\n\nMaybe marking everything as needing 5.8 or later isn't the right thing\nto do. E.g. the git-*cvs*.perl code mostly isn't touched, but\ncvsexportcommit does use Git.pm, so that would also need to be pinned\nat 5.6 if cvsexportcommit was.\n\n> Perl 5.6.1 doesn't support the list open syntax, so one must replace\n> open(my $fh, '-|', @list) with open(my $fh, '-|'), and then exec(@list).\n> I'm working up a patch set to fill my own needs on this system, but based\n> on the subsequent discussion about setting 5.8 as the minimum, it sounds\n> like it's not worth submitting.\n\nThe issue isn't that we don't have a workaround for individual bits\nlike open(my $fh, '-|', @list), but rather that keeping all of the\ncode 5.6 compatible is a burden on ongoing maintenance for a very\nmarginal benefit.\n"},{"id":"151709","messageId":"4C9F1EDF.1030104@op5.se","threadId":"25220","inReplyTo":"AANLkTinQQxsbUHiKLaCJ0b5-dcvdE4JhLMVWOV5P2bkh@mail.gmail.com","subject":"Re: Minimum Perl version?","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2010-09-26T10:22:23Z","receivedAt":"2010-09-26T10:22:23Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"On 09/25/2010 12:39 AM, Ævar Arnfjörð Bjarmason wrote:\n> On Fri, Sep 24, 2010 at 20:40, Tait<git.git@t41t.com>  wrote:\n>>>> What is the minimum Perl version git expects to support?\n>>>>\n>>>> I ask, because f922df8... seems to have introduced a open() syntax that\n>>>> is not compatible with some older Perl versions.\n>>>\n>>> We generally support 5.6 or above, but 5.8 or above for some other\n>>> programs.\n>>\n>> I am having to use a system with 5.6.1 to do cvsimport and cvsexportcommit,\n>> and interactive add. I haven't tried sendmail or other functions, yet. This\n>> system was previously using git 1.6.5.something, and did not have these\n>> problems as of that release, but now that I'm building git 1.7.3, they\n>> have appeared.\n> \n> Maybe marking everything as needing 5.8 or later isn't the right thing\n> to do. E.g. the git-*cvs*.perl code mostly isn't touched, but\n> cvsexportcommit does use Git.pm, so that would also need to be pinned\n> at 5.6 if cvsexportcommit was.\n> \n>> Perl 5.6.1 doesn't support the list open syntax, so one must replace\n>> open(my $fh, '-|', @list) with open(my $fh, '-|'), and then exec(@list).\n>> I'm working up a patch set to fill my own needs on this system, but based\n>> on the subsequent discussion about setting 5.8 as the minimum, it sounds\n>> like it's not worth submitting.\n> \n> The issue isn't that we don't have a workaround for individual bits\n> like open(my $fh, '-|', @list), but rather that keeping all of the\n> code 5.6 compatible is a burden on ongoing maintenance for a very\n> marginal benefit.\n\nIf someone steps up and makes various snippets of code 5.6 compatible while\nnot introducing any penalties for 5.8 users, I see no reason to drop those\npatches.\n\nTait, submit your patches and I'm sure they'll be reviewed the same as\neverything else. If they make the code a lot harder to understand or a lot\nslower, I'm sure they'll be dropped. If they don't, I'm reasonably certain\nJunio will take them on. I barely speak Perl though, so reviewing them will\nhave to be done by someone else.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n\nConsidering the successes of the wars on alcohol, poverty, drugs and\nterror, I think we should give some serious thought to declaring war\non peace.\n"}]}