develooper Front page | perl.perl5.porters | Postings from June 2015

Re: for 5.24: new categories for strict/warnings?

Thread Previous | Thread Next
Paul "LeoNerd" Evans
June 5, 2015 16:04
Re: for 5.24: new categories for strict/warnings?
Message ID:
On Fri, 5 Jun 2015 16:42:35 +0100
Smylers <> wrote:

> It'd be better for a plain use warnings to mean ‘the warnings of
> whichever version I've specified, defaulting to v5.22 if none’. Then
> Eddie can get his desired behaviour with:
>   use v5.24;
>   use warnings;
> On finding itself invoked without any tags, warnings would then see
> that use v5.24 has been specified, and so behave like use warnings
> 'v5.24'.
> That way Perl can safely introduce new warnings every version, and
> users get to benefit from the new warnings straightforwardly, yet
> people can still upgrade cautiously.

I wonder if there'd be possibility of this applying something like

  use v5.24;  ==>  $^H{requested_version} = '5.024';

such that now can simply inspect the caller's hints hash
for this key, to see what version we're working to. An unqualified

  use warnings;

could then mean the same as

  use warnings ':5.24';

in this case.

Paul "LeoNerd" Evans  |

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