Think about Loose Coupling | |
PerlMonks |
Four annoying warningsby tobyink (Canon) |
on Dec 09, 2012 at 00:05 UTC ( [id://1007936]=perlmeditation: print w/replies, xml ) | Need Help?? |
This started off as a reply to Re: Remove letters from variables used in math operation?, but I decided to turn it into a meditation. use warnings enables a whole bunch of different warnings. There are four in particular that I think are dumb and have no qualms about disabling when they annoy me:
Now, I don't mean to suggest that use warnings is not useful; it is. Even the four warning categories above can occasionally be useful. What I am saying is that sometimes particular warnings can be more annoying than they are useful. When that happens, don't jump through hoops to satisfy the warnings pragma. Just disable the warnings which are annoying you.
Strictures and warnings are not a penitence. They're supposed to make your life easier. If they're not doing that, then there is no virtue in suffering them. Update: (six months later...) now it's time to add "experimental::smartmatch" to that list.
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
Back to
Meditations
|
|