X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlstyle.pod;h=bfe5b767135ad6e3352b6e019a6ce304436021cf;hb=0fd3e83781d94dc1f84f1fcb8cce89958518b5e8;hp=cf280ce1da07763d28a72673f2a1d55644dc6de5;hpb=7b8d334a971230040a212bc5038097b3f600a094;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlstyle.pod b/pod/perlstyle.pod index cf280ce..bfe5b76 100644 --- a/pod/perlstyle.pod +++ b/pod/perlstyle.pod @@ -10,13 +10,14 @@ make your programs easier to read, understand, and maintain. The most important thing is to run your programs under the B<-w> flag at all times. You may turn it off explicitly for particular -portions of code via the C<$^W> variable if you must. You should +portions of code via the C pragma or the C<$^W> variable +if you must. You should also always run under C or know the reason why not. The C and even C pragmas may also prove useful. Regarding aesthetics of code lay out, about the only thing Larry -cares strongly about is that the closing curly brace of +cares strongly about is that the closing curly bracket of a multi-line BLOCK should line up with the keyword that started the construct. Beyond that, he has other preferences that aren't so strong: @@ -260,7 +261,8 @@ Line up your transliterations when it makes sense: Think about reusability. Why waste brainpower on a one-shot when you might want to do something like it again? Consider generalizing your code. Consider writing a module or object class. Consider making your -code run cleanly with C and B<-w> in effect. Consider giving away +code run cleanly with C and C (or B<-w>) in effect +Consider giving away your code. Consider changing your whole world view. Consider... oh, never mind.