A little while back there was a long discussion on p5p/RT about fatal warnings, a blog posting about fatal warnings by chromatic, and a long discussion about use VERSION; and related issues in here on PerlMonks.
All this got me thinking, and I realized that Perl gives you an incredible amount of control over features, strictures, warnings, best practices, and on and on:
- the #! line, use VERSION;, no VERSION; $] and $^V
- use/no feature ...; with currently 10 features
- use/no strict ...; with 3 categories
- use warnings FATAL=>..., NONFATAL=>...;
- use/no autodie ...; with 60+ categories/errors
- use/no warnings ...; with 50+ categories
- warn, die, Carp
- $SIG{__WARN__}, $SIG{__DIE__}
- eval {}, Try::Tiny, and more...
- Modern::Perl and more...
- Perl::Critic with 140+ default policies and 25+ extension packages on CPAN
- Perl::Tidy
- Pod::Checker, Test::Pod::Coverage, and more...
- ... and probably lots more I've missed...
This variety makes it pretty obvious that which of these apply will be different between people and applications. So the next time someone disagrees with a recommended practice or Perl's defaults, it might be helpful to point out the number of choices and level of control they have.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|