Skip Menu |
 

This queue is for tickets about the strictures CPAN distribution.

Report information
The Basics
Id: 122699
Status: open
Priority: 0/
Queue: strictures

People
Owner: Nobody in particular
Requestors: pali [...] cpan.org
Cc:
AdminCc:

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



Subject: strictures enables fundamentaly broken fatal warnings and therefore is unusable
Download (untitled) / with headers
text/plain 851b
Same problem as for module common::sense reported in ticket: https://rt.cpan.org/Ticket/Display.html?id=122608 Due to broken fatal warnings in perl, and because strictures module enable broken fatal warnings, it is broken itself. Here is same example as from common::sense ticket: $ touch /tmp/test $ perl5.10.1 -MData::Dumper -e 'stat "/tmp/test"; eval { -l TEST; 1 }; print Dumper([stat _])' $VAR1 = []; $ touch /tmp/test $ perl5.10.1 -MData::Dumper -e 'use strictures 2; stat "/tmp/test"; eval { -l TEST; 1 }; print Dumper([stat _])' $VAR1 = [ 25, 2977687, 33188, 1, 1000, 1000, 0, 0, 1501764352, 1501764352, 1501764352, 4096, 0 ]; Please do not enable broken fatal warnings to make module usable. Thanks!
Download (untitled) / with headers
text/plain 1.2k
On Thu Aug 03 08:54:26 2017, PALI wrote: Show quoted text
> Same problem as for module common::sense reported in ticket: > https://rt.cpan.org/Ticket/Display.html?id=122608 > > Due to broken fatal warnings in perl, and because strictures module > enable broken fatal warnings, it is broken itself. Here is same > example as from common::sense ticket: > > $ touch /tmp/test > $ perl5.10.1 -MData::Dumper -e 'stat "/tmp/test"; eval { -l TEST; 1 }; > print Dumper([stat _])' > $VAR1 = []; > > $ touch /tmp/test > $ perl5.10.1 -MData::Dumper -e 'use strictures 2; stat "/tmp/test"; > eval { -l TEST; 1 }; print Dumper([stat _])' > $VAR1 = [ > 25, > 2977687, > 33188, > 1, > 1000, > 1000, > 0, > 0, > 1501764352, > 1501764352, > 1501764352, > 4096, > 0 > ]; > > Please do not enable broken fatal warnings to make module usable. > Thanks!
I fail to see the problem here - '-l TEST' is obviously bogus in this situation, so it die()ing immediately when the warning is emitted is exactly what strictures intends to enable. The fact that this has the side effect of stopping the broken code from clearing the stat() cache doesn't seem to me to be a problem. What, specifically, do you consider broken here?
Download (untitled) / with headers
text/plain 1.7k
On Thu Aug 03 15:20:18 2017, MSTROUT wrote: Show quoted text
> On Thu Aug 03 08:54:26 2017, PALI wrote:
> > Same problem as for module common::sense reported in ticket: > > https://rt.cpan.org/Ticket/Display.html?id=122608 > > > > Due to broken fatal warnings in perl, and because strictures module > > enable broken fatal warnings, it is broken itself. Here is same > > example as from common::sense ticket: > > > > $ touch /tmp/test > > $ perl5.10.1 -MData::Dumper -e 'stat "/tmp/test"; eval { -l TEST; 1 > > }; > > print Dumper([stat _])' > > $VAR1 = []; > > > > $ touch /tmp/test > > $ perl5.10.1 -MData::Dumper -e 'use strictures 2; stat "/tmp/test"; > > eval { -l TEST; 1 }; print Dumper([stat _])' > > $VAR1 = [ > > 25, > > 2977687, > > 33188, > > 1, > > 1000, > > 1000, > > 0, > > 0, > > 1501764352, > > 1501764352, > > 1501764352, > > 4096, > > 0 > > ]; > > > > Please do not enable broken fatal warnings to make module usable. > > Thanks!
> > I fail to see the problem here - '-l TEST' is obviously bogus in this > situation, so it die()ing immediately when the warning is emitted is > exactly what strictures intends to enable. > > The fact that this has the side effect of stopping the broken code > from clearing the stat() cache doesn't seem to me to be a problem. > > What, specifically, do you consider broken here?
As stated in 122608 this is just one example which shows that fatal warnings are broken. There are more problems. use strictures changes result of executed code which is broken behavior. Moreover if you run this code with use strictures under different versions of perl you got different result. Without use strictures I got same result with perl5.10 and perl5.24.
Download (untitled) / with headers
text/plain 192b
On 2017-08-09 01:12:46, PALI wrote: Show quoted text
> this is just one example which shows that fatal warnings are broken
Could you explain how it shows that? Why is not clearing the stat cache "broken"?
Download (untitled) / with headers
text/plain 693b
Show quoted text
> As stated in 122608 this is just one example which shows that fatal > warnings are broken. There are more problems. use strictures changes > result of executed code which is broken behavior. Moreover if you run > this code with use strictures under different versions of perl you got > different result. Without use strictures I got same result with > perl5.10 and perl5.24.
The example you gave is extremely weak. Although I can follow your logic regarding stat, I don't think the change from the fatal warning actually makes the behavior incorrect. Having strictures change the behavior of the code by enabling fatal warnings is kind of the point, so you'll need a better justification.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.