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

Re: use v5.36; use warnings;

Thread Previous | Thread Next
From:
Darren Duncan
Date:
May 29, 2021 01:38
Subject:
Re: use v5.36; use warnings;
Message ID:
abae5474-c052-f70a-9bf4-abffd5a294b9@darrenduncan.net
On 2021-05-28 6:32 p.m., Joseph Brenner wrote:
>> What I would expect to happen is that the statements are applied in order.
> 
> That makes sense if you think abouit it, but it would be pretty easy
> mistake to make, I would think.  "Why am I still getting warnings
> after I explicitly said 'no warnings'?"

It makes more sense when you think of these things being lexical so there can be 
multiple instances throughout the code, and then you would expect the statement 
to apply just to what follows it until overridden by something else.

Also, anyone savvy enough to know about "no" should be savvy enough to know that 
its overriding an explicit "use" further up.  Those who aren't savvy and are 
just copying boilerplate wouldn't be including any "no".

Also, it would make sense that one would normally make the "use v5.36" etc the 
very first thing above any use/no lines, in which case its not an issue.

-- Darren Duncan


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About