develooper Front page | perl.perl5.porters | Postings from November 2011

Re: Make use-version, feature and strict play nicely together

Thread Previous | Thread Next
From:
Jesse Luehrs
Date:
November 9, 2011 08:19
Subject:
Re: Make use-version, feature and strict play nicely together
Message ID:
20111109161907.GN2678@tozt.net
On Wed, Nov 09, 2011 at 05:12:30PM +0100, Johan Vromans wrote:
> David Golden <xdaveg@gmail.com> writes:
> 
> > I think the kindest thing (sanest thing?) is not to retroactively have
> > "use v5.10|12|14" turn *off* anything (or unimport anything) that was
> > enabled.  We could choose to have "use v5.16" create the "stable"
> > state you describe, though I don't think that should include
> > unimporting modules that were imported, only resetting
> > features/pragmas.
> 
> To summarize:
> 
>  - use use v5.1{0,2,4} works as usual
>  - use v5.16 will abort unless it is the first statement.
>  - under v5.16, using any other use v5.1{0,2,4} will abort
>  - starting with v5.16, a well-defined set of features/pragmas will be
>    established.
> 
> -- Johan

So does this mean that "use v5.16" is no longer lexical (if there can be
only one declaration, it will necessarily have to apply to the entire
program to actually make sense)? Will "use v5.16; use CGI;" break (since
CGI.pm isn't strict-safe)? This seems to defeat the entire goal here.

-doy

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