develooper Front page | perl.perl5.porters | Postings from March 2000

Re: [PATCH 5.6.0-RC1] more warnings tidy ups

Thread Previous | Thread Next
From:
Hugo
Date:
March 15, 2000 08:48
Subject:
Re: [PATCH 5.6.0-RC1] more warnings tidy ups
Message ID:
200003151652.QAA25733@crypt.compulink.co.uk
In <5104D4DBC598D211B5FE0000F8FE7EB2067FE5A6@mbtlipnt02.btlabs.bt.co.uk>,
paul.marquess@bt.com writes:
:> Isn't this somewhat equivalent to the '-w on by default' scenario?
:
:I don't know how much you know about the warnings pragma, so forgive me if
:I'm telling you something you already know.
:
:The BIG difference between having a "use warnings" and "-w" is that the
:former will be limited to the scope of the new module only, while "-w"
:switches warnings on everywhere. That means that anyone developing a new
:module (in this case, using the skeleton that h2xs creates) can safely
:enable warnings in their module without having to worry about the warnings
:setting of modules that they make use of or code that will call their
:module.

This much I understand. However, if we were to have 'use warnings' by
default everywhere it would be essentially the same as having -w on by
default. Let me ask a different way: why are the .pm files generated by
h2xs special enough to have 'use warnings' by default, when nothing
else has that?

To repeat, I'm not suggesting this is necessarily a bad idea; I just
don't understand the rationale.

Hugo

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