Skip Menu |

This queue is for tickets about the Module-Install CPAN distribution.

Report information
The Basics
Id: 76035
Status: open
Priority: 0/
Queue: Module-Install

People
Owner: Nobody in particular
Requestors: 'spro^^*%*^6ut# [...] &$%*c
Cc: ether [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Implicit strictures cause back-compat problems
Module::Install tries to enable strict mode in the caller, but, due to a perl bug (<https://rt.perl.org/rt3/Ticket/Display.html?id=70151>). Every ‘use’ implies BEGIN { require ... ] and every require implies eval "...". And BEGIN { eval { strict->import } } didn’t work before, because of the eval. Now it does work in bleadperl. Since it has never actually enabled strict, it would be a backwards-incompatible change for it to do so now. So I would suggest simply removing the attempt to enable strictures.
I have grepped through the results of my smokers and following affected modules. I hope the links survive the wrapping. http://matrix.cpantesters.org/?dist=ActiveResource-0.01 http://matrix.cpantesters.org/?dist=Algorithm-FuzzyCmeans-0.02 http://matrix.cpantesters.org/?dist=App-CLI-Extension-1.42 http://matrix.cpantesters.org/?dist=Authen-Htpasswd-Trac-0.00004 http://matrix.cpantesters.org/?dist=autobox-String-Inflector-0.01 http://matrix.cpantesters.org/?dist=Bot-BasicBot-Pluggable-Module-GoodBad-0.04 http://matrix.cpantesters.org/?dist=Catalyst-Helper-View-TTSimple-0.2 http://matrix.cpantesters.org/?dist=Data-Page-FlickrLike-2.00 http://matrix.cpantesters.org/?dist=Debug-STDERR-0.00003 http://matrix.cpantesters.org/?dist=Encode-Base58-BigInt-0.02 http://matrix.cpantesters.org/?dist=File-Glob-Windows-0.1.4 http://matrix.cpantesters.org/?dist=File-History-0.00002 http://matrix.cpantesters.org/?dist=Geography-JapaneseMunicipals-0.01 http://matrix.cpantesters.org/?dist=Hoppy-0.01003 http://matrix.cpantesters.org/?dist=Math-Lsoda-0.04 http://matrix.cpantesters.org/?dist=Module-Install-ProvidesClass-1.000000 http://matrix.cpantesters.org/?dist=MooseX-Role-XMLRPC-Client-0.04 http://matrix.cpantesters.org/?dist=MouseX-Types-Path-Class-0.06 http://matrix.cpantesters.org/?dist=Plack-Server-POE-0.4 http://matrix.cpantesters.org/?dist=Statistics-Associations-0.00003 http://matrix.cpantesters.org/?dist=Statistics-Zscore-0.00002 http://matrix.cpantesters.org/?dist=Template-Plugin-TruncateByWord-0.1 http://matrix.cpantesters.org/?dist=Test-DBIx-Class-0.31 http://matrix.cpantesters.org/?dist=WWW-Shorten-0rz-0.07 http://matrix.cpantesters.org/?dist=XML-AutoWriter-0.4 http://matrix.cpantesters.org/?dist=XML-SAX-Machines-0.42
RT-Send-CC: andk [...] cpan.org
On Sun Mar 25 17:47:23 2012, SPROUT wrote: Show quoted text
> Module::Install tries to enable strict mode in the caller, but, due to > a perl bug > (<https://rt.perl.org/rt3/Ticket/Display.html?id=70151>). Every ‘use’ > implies BEGIN { require > ... ] and every require implies eval "...". And BEGIN { eval { > strict->import } } didn’t work before, > because of the eval. Now it does work in bleadperl. > > Since it has never actually enabled strict, it would be a backwards- > incompatible change for it to > do so now. > > So I would suggest simply removing the attempt to enable strictures.
It turns out that the stricture-enabling was moved to import() in version 0.95, so that’s when it started enabling strict for modules that upgraded the bundled Module::Install. All the affected modules are using older Module::Installs, otherwise they would have started failing some time ago. So now I don’t know what the best solution is. 0.95 was released only two years ago, so maybe it is best to disable strictures in newer versions. If strictures are left in, they should certainly be documented. In any case, the affected distributions *all* need to be fixed somehow or another, either by modifying/updating the bundled Module::Install, or by making the Makefile.PL strict-safe.
On Wed Mar 28 12:43:59 2012, SPROUT wrote: Show quoted text
> On Sun Mar 25 17:47:23 2012, SPROUT wrote:
> > Module::Install tries to enable strict mode in the caller, but, due
> to > ‘use’
> > implies BEGIN { require > > ... ] and every require implies eval "...". And BEGIN { eval { > > strict->import } } didn’t work before, > > because of the eval. Now it does work in bleadperl. > > > > Since it has never actually enabled strict, it would be a backwards- > > incompatible change for it to > > do so now. > > > > So I would suggest simply removing the attempt to enable strictures.
> > It turns out that the stricture-enabling was moved to import() in > version 0.95, so that’s when > it started enabling strict for modules that upgraded the bundled > Module::Install. > > All the affected modules are using older Module::Installs, otherwise > they would have started > failing some time ago. > > So now I don’t know what the best solution is. 0.95 was released only > two years ago, so > maybe it is best to disable strictures in newer versions. If > strictures are left in, they should > certainly be documented. > > In any case, the affected distributions *all* need to be fixed somehow > or another, either by > modifying/updating the bundled Module::Install, or by making the > Makefile.PL strict-safe.
This reminds me of <http://use.perl.org/use.perl.org/_Alias/journal/40302.html>.