[tpm] why wouldn't violating "use warnings" always be fatal?

Stuart Watt stuart at morungos.com
Fri Aug 22 13:41:20 PDT 2014


I’d check into this too: http://www.modernperlbooks.com/mt/2014/01/fatal-warnings-are-a-ticking-time-bomb.html

Basically, if some module somewhere in a dependency uses Moo, you can get this effect. A change somewhere quite remote can have nasty consequences. And i quote:

> In other words, any CPAN module which uses Moo is, by default, vulnerable to a change in any of its dependencies which may legitimately produce new warnings. By "vulnerable" I mean "your program may start crashing in library code you didn't write and do not maintain and, by the way, may be in a dependency several levels deep that you didn't even know uses Moo."


The last bit is actually quite scary. 

All the best
Stuart


On Aug 22, 2014, at 2:52 PM, J. Bobby Lopez <jbl at jbldata.com> wrote:

> Also, if you avoid the use of the system perl, and maybe use perlbrew to install 5.8.8 on both prod and dev, you may be able to avoid distro-specific inconsistencies (or rule out the system perl as the culprit).
> 
> On August 22, 2014 2:46:02 PM EDT, "J. Bobby Lopez" <jbl at jbldata.com> wrote:
> Compare the actual build number, since the base version number may be the same, but builds are most likely different, especially across distros. It may be that your dev environment has something like a 'no warnings q{uninitialized}' coded into some library on the dev side that doesn't exist in production. Just a guess.
> 
> On August 22, 2014 2:32:48 PM EDT, Fulko Hew <fulko.hew at gmail.com> wrote:
> 
> I just got bitten by different behavior on different platforms,
> and I can't justify it. Perhaps someone out there can?
> 
> Platform #1: Perl 5.8.8 on Fedora    (development system)
> Platform #2: Perl 5.8.8 on Debian    (production system)
> 
> It turns out my application _did_ have a bug in it, but it wasn't
> detected during my testing when run on the dev sys, but failed
> when the same dataset was encountered on the production system.
> 
> a) I have 'use strict' and 'use warnings' in my app.
> b) I had an uninitialized variable used in a print statement.
> 
> On the production machine... my app died with the error:
> 'Use of uninitialized value in concatenation'
> just as you would expect.
> 
> But on my dev sys, the app doesn't die, or even complain!
> 
> Once I found out what was happening, I ran it under the debugger on my dev sys,
> and when I stepped through the print statement... It bitches and dies.
> But without the debugger,  all is (apparently) happy.
> (That's why I didn't detect and fix the bug during testing.)
> 
> So...
> Why would my dev sys only flag and die under the debugger (and not with a normal run)?
> And why does my prod system, work correctly (ie. flag and die) ?
> 
> 
> 
> 
> 
> 
> toronto-pm mailing list
> toronto-pm at pm.org
> http://mail.pm.org/mailman/listinfo/toronto-pm
> _______________________________________________
> toronto-pm mailing list
> toronto-pm at pm.org
> http://mail.pm.org/mailman/listinfo/toronto-pm

--
Stuart Watt
stuart at morungos.com / twitter.com/morungos


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/toronto-pm/attachments/20140822/1b3ea1e2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mail.pm.org/pipermail/toronto-pm/attachments/20140822/1b3ea1e2/attachment.bin>


More information about the toronto-pm mailing list