git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] check-non-portable-shell: support Perl versions older than 5.10

From
Eric Sunshine <sunshine@sunshineco.com>
Date
May 10, 2019, 20:39 UTC
Message-ID
<CAPig+cR30dnurYq=G_Ki2Nf7vFCkebcR+egvhbGE5w8XSBKQBA@mail.gmail.com>
In-Reply-To
<87ftpnhknn.fsf@evledraar.gmail.com>
On Thu, May 9, 2019 at 8:33 AM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 12 quoted lines
> On Thu, May 09 2019, Eric Sunshine wrote:
> > Although this implementation is well supported in reasonably modern Perl
> > versions (5.10 and later), it fails in a couple ways with older versions
> > (such as Perl 5.8 shipped with ancient Mac OS 10.5).
> > [...]
> > Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
>
> This fix is fine, but just for the record: There's no problem with
> assigning to $_, it just throws an error about $_ *because* of the
> readline() issue, i.e. it'll fail, clobber $_ to a read-only value, and
> off we go.
> So just assigning to $_ is fine, and you don't need to localize it.

Thanks for the clarification. I'll drop the misleading discussion of $_ from the commit message and eliminate $_ localization from the patch proper.

Show 5 quoted lines
> Anyway, I tested this on 5.8, it works, then looked at the output and
> wondered if I could improve it, came up with this:
> [...large WIP patch snipped...]
> I figured it was better than the current output just squashing such a
> long line together [...]

That could be done, though it is outside the scope of this portability-fix patch.

Also, the existing output with its sufficiently clear problem explanations is probably "good enough" to clue in the developer of new test code as to what needs fixing, so I'm also not sure that it's worth that much effort to prettify what should be a relatively rare warning message from code which has not yet made it into the project. I wouldn't be opposed to someone working on it, but I don't plan on tackling it myself.

Previous: Ævar Arnfjörð BjarmasonNext: Eric Sunshine
Message 8 of 9 in “Git build on antique PowerMac”
  1. Jeffrey WaltonMay 5, 2019
  2. SZEDER GáborMay 5, 2019
  3. Eric SunshineMay 5, 2019
  4. Ævar Arnfjörð BjarmasonMay 8, 2019
  5. Eric SunshineMay 9, 2019
  6. check-non-portable-shell: support Perl versions older than 5.10Eric Sunshine, May 9, 2019
  7. Ævar Arnfjörð BjarmasonMay 9, 2019
  8. Eric SunshineMay 10, 2019
  9. check-non-portable-shell: support Perl versions older than 5.10Eric Sunshine, May 11, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.