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 <vinc...@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)

Reply via email to