ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/common-sense/sense.pm.PL
(Generate patch)

Comparing common-sense/sense.pm.PL (file contents):
Revision 1.11 by root, Sun Jun 17 12:26:43 2012 UTC vs.
Revision 1.12 by root, Thu Jun 27 11:43:43 2013 UTC

231favourable way, calling it outright "wrong"), but standard utilities, such 231favourable way, calling it outright "wrong"), but standard utilities, such
232as L<prove>, or MakeMaker when running C<make test>, still enable them 232as L<prove>, or MakeMaker when running C<make test>, still enable them
233blindly. 233blindly.
234 234
235For version 2 of common::sense, we finally sat down a few hours and went 235For version 2 of common::sense, we finally sat down a few hours and went
236through I<every single warning message>, identifiying - according to 236through I<every single warning message>, identifying - according to
237common sense - all the useful ones. 237common sense - all the useful ones.
238 238
239This resulted in the rather impressive list in the SYNOPSIS. When we 239This resulted in the rather impressive list in the SYNOPSIS. When we
240weren't sure, we didn't include the warning, so the list might grow in 240weren't sure, we didn't include the warning, so the list might grow in
241the future (we might have made a mistake, too, so the list might shrink 241the future (we might have made a mistake, too, so the list might shrink
250warnings>, which is good if you are into strict things (we are not, 250warnings>, which is good if you are into strict things (we are not,
251actually, but these things tend to be subjective). 251actually, but these things tend to be subjective).
252 252
253After deciding on the list, we ran the module against all of our code that 253After deciding on the list, we ran the module against all of our code that
254uses C<common::sense> (that is almost all of our code), and found only one 254uses C<common::sense> (that is almost all of our code), and found only one
255occurence where one of them caused a problem: one of elmex's (unreleased) 255occurrence where one of them caused a problem: one of elmex's (unreleased)
256modules contained: 256modules contained:
257 257
258 $fmt =~ s/([^\s\[]*)\[( [^\]]* )\]/\x0$1\x1$2\x0/xgo; 258 $fmt =~ s/([^\s\[]*)\[( [^\]]* )\]/\x0$1\x1$2\x0/xgo;
259 259
260We quickly agreed that indeed the code should be changed, even though it 260We quickly agreed that indeed the code should be changed, even though it
262 262
263 263
264=item much reduced typing 264=item much reduced typing
265 265
266Especially with version 2.0 of common::sense, the amount of boilerplate 266Especially with version 2.0 of common::sense, the amount of boilerplate
267code you need to add to gte I<this> policy is daunting. Nobody would write 267code you need to add to get I<this> policy is daunting. Nobody would write
268this out in throwaway scripts, commandline hacks or in quick internal-use 268this out in throwaway scripts, commandline hacks or in quick internal-use
269scripts. 269scripts.
270 270
271By using common::sense you get a defined set of policies (ours, but maybe 271By using common::sense you get a defined set of policies (ours, but maybe
272yours, too, if you accept them), and they are easy to apply to your 272yours, too, if you accept them), and they are easy to apply to your
289 289
290The money/time/effort/electricity invested in these gigabytes (probably 290The money/time/effort/electricity invested in these gigabytes (probably
291petabytes globally!) of wasted memory could easily save 42 trees, and a 291petabytes globally!) of wasted memory could easily save 42 trees, and a
292kitten! 292kitten!
293 293
294Unfortunately, until everybods applies more common sense, there will still 294Unfortunately, until everybody applies more common sense, there will still
295often be modules that pull in the monster pragmas. But one can hope... 295often be modules that pull in the monster pragmas. But one can hope...
296 296
297=cut 297=cut
298 298
299package common::sense; 299package common::sense;
478 478
479This was not implemented in version 1.0 because of the daunting number 479This was not implemented in version 1.0 because of the daunting number
480of warning categories and the difficulty in getting exactly the set of 480of warning categories and the difficulty in getting exactly the set of
481warnings you wish (i.e. look at the SYNOPSIS in how complicated it is to 481warnings you wish (i.e. look at the SYNOPSIS in how complicated it is to
482get a specific set of warnings - it is not reasonable to put this into 482get a specific set of warnings - it is not reasonable to put this into
483every module, the maintenance effort would be enourmous). 483every module, the maintenance effort would be enormous).
484 484
485=item But many modules C<use strict> or C<use warnings>, so the memory 485=item But many modules C<use strict> or C<use warnings>, so the memory
486savings do not apply? 486savings do not apply?
487 487
488I suddenly feel sad... 488I suddenly feel sad...

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines