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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 9, 2019 at 8:33 AM Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> wrote:
> 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@xxxxxxxxxxxxxx>
>
> 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.

> 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.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux