develooper Front page | perl.perl5.porters | Postings from July 2021

Re: PSC #031 2021-07-30

Thread Previous | Thread Next
Dan Book
July 30, 2021 16:54
Re: PSC #031 2021-07-30
Message ID:
On Fri, Jul 30, 2021 at 12:24 PM Paul "LeoNerd" Evans <> wrote

> ## More strictures
> We looked at trying to resolve the logjam that is the fact that
> `` implies just three strictness flags (vars, refs, subs) and
> we seem unable to add more. The shape we came up with is that it would
> be nice if `` had versioned bundles, like `` does,
> and that an undecorated `use strict` really meant
>     use strict ':5.8';
> Furthermore, much like the version bundles you get from `use vX`
> turning into `use feature ':X`, the same should be done with `strict`
> (and `warnings` while we're at it). This would give us the freedom to
> one day add more strictness flags - like `use strict 're'` or anything
> else that might come along.
> Rik predicts: Somebody’s gonna say “but I want my CPAN-published code
> to use warnings ':latest'”. What do we say? Either we add it or we let
> somebody implement it on their own because $^V exists.
> People can always write:
>     use warnings ":$^V";
> This still leaves the open question of what does `use strict ':all'`
> really mean. Rik: “use strict ‘:all’;” means “use strict ‘:5.8’” but
> “no strict ‘:all’” means all for real. Paul: But authors should have
> known it was always a ticking time-bomb in their code anyway, right? ;)

This last part is easy. "use strict ':all'" doesn't currently exist, so it
can continue not existing.

Versioned strict bundles could be useful to add. I expect regardless of the
direct mechanism, ultimately the most impactful thing to affect would be
what "use VERSION" does in future versions. So maybe it's not necessary to

But I continue to disagree with the idea of versioned warnings. "use
warnings" is *supposed* to get you new warnings every Perl release, and
that is the explicitly documented warnings contract. Versioning them would
be counterproductive.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About