Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1012163

Bug#931418: closed by Niko Tyni <ntyni@debian.org> (Re: Bug#931418: perl: no errors with strict subs and bareword following a minus operator)

From Vincent Lefevre <vincent@vinc17.net>
Newsgroups linux.debian.bugs.dist
Subject Bug#931418: closed by Niko Tyni <ntyni@debian.org> (Re: Bug#931418: perl: no errors with strict subs and bareword following a minus operator)
Date 2020-06-01 01:30 +0200
Message-ID <AcFyV-eJ-5@gated-at.bofh.it> (permalink)
References <AcFyV-eJ-7@gated-at.bofh.it> <yg8Su-2kD-5@gated-at.bofh.it> <AcFyW-eJ-9@gated-at.bofh.it> <yg8Su-2kD-5@gated-at.bofh.it> <AcFyW-eJ-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 2020-05-31 15:45:11 +0000, Debian Bug Tracking System wrote:
> Unary plus has no effect, so the result is a bareword that is illegal
> under "strict subs".  Unary minus turns the bareword into a string with
> "-" prepended.  This is no longer a bareword, and hence legal under
> "strict subs".

As I understand it, since this is described in the perlop(1) man page,
this operation is done at execution time, like the other operations.
Thus at compilation time (where "strict subs" takes effect), it should
still be a bareword. Anyway, even if the transformation is done at
compilation time, there was first a bareword...

> Programming Perl: 3rd Edition also has mentions it. On page 92:
> 
>   One effect of these rules is that -bareword is equivalent to
>   "-bareword".  This is most useful to Tk programmers.

But "strict subs" changes the default behavior by forbidding some
constructs (at compilation time).

> I think it's clear that this is not a bug and is not going to change.
> Feel free to take it up upstream if you disagree.

As I disagree, I've reported the bug upstream:

  https://github.com/Perl/perl5/issues/17822

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Back to linux.debian.bugs.dist | Previous | Next | Find similar | Unroll thread


Thread

Bug#931418: closed by Niko Tyni <ntyni@debian.org> (Re: Bug#931418: perl: no errors with strict subs and bareword following a minus operator) Vincent Lefevre <vincent@vinc17.net> - 2020-06-01 01:30 +0200

csiph-web