--- common-sense/sense.pm 2009/07/09 17:33:40 1.3 +++ common-sense/sense.pm 2009/07/09 17:58:11 1.4 @@ -20,6 +20,22 @@ =over 4 +=item no warnings + +The dreaded warnings. Even worse, the horribly dreaded C<-w> switch. Even +though we don't care if other people use warnings (and certainly there are +useful ones), a lot of warnings simply go against the spirit of Perl, most +prominently, the warnings related to C. There is nothing wrong with +C: it has well-defined semantics, it is useful, and spitting out +warnings you never asked for is just evil. + +So every module needs C to avoid somebody accidentally using +C<-w> and forcing his bad standards on our code. No will do. + +Funnily enough, L explicitly mentions C<-w> (and not in a +favourable way), but standard utilities, such as L, or MakeMaker +when running C enable them blindly. + =item use strict qw(subs vars) Using C is definitely common sense, but C[0] } -Must be written like this, when C is in scope, and -C<$var> can legally be C: +Must be written like this (or similarly), when C is in +scope, and C<$var> can legally be C: @{ $var->[0] || [] } @@ -55,29 +71,12 @@ modules that are no longer maintained work with newer versions of Perl, regardless of use feature. -If your code isn'talive, it's dead, jim. - -=item no warnings - -The dreaded warnings. Even worse, the horribly dreaded C<-w> switch. Even -though we don't care if other people use warnings (and certainly there are -useful ones), a lot of warnings simply go against the spirit of Perl, most -prominently, the warnings related to C. There is nothing wrong with -C: it has well-defined semantics, it is useful, and spitting out -warnings you never asked for is just evil. - -So every module needs C to avoid somebody accidentally using -C<-w> and forcing his bad standards on our code. No will do. - -(Also, why isn't this a C switch? Adding warnings is -apparently considered O.K., even if it breaks your programs). +If your code isn't alive, it's dead, jim. =item much less memory Just using all those pragmas together waste I<< B<776> kilobytes - >> of precious memory in my perl, for I, which on our machines, is a lot. In comparison, this module only uses I<< B >> kilobytes (I even had to write it out so it looks like more) of memory on the same platform. @@ -105,16 +104,23 @@ $^H{feature_state} = 1; } -=cut - 1; =back +=head1 NO 'no common::sense' + +This module doesn't offer an unimport. First of all, it wastes even more +memory, second, and more importantly, who with even a bit of common sense +would want no common sense? + =head1 AUTHOR Marc Lehmann http://home.schmorp.de/ + Robin Redeker, "". + + =cut