KW.pm Perl Style Guides #25

Going beyond these Style Guides: 2

Style

  • hash variable names: possibly append _of if it makes things clearer:

    • $color_of{$widget} eq 'green'

  • POD docs

    • Use POD for interface notes and perl comments for implementation notes.

    • Inline or EOF POD?

      • Style-wise, should be decided beforehand.

      • Inline supports laziness: not bouncing around to update POD

      • But EOF allows you to rearrange the docs in a different order than the code.

      • Both have their place.

      • Possibly, end-user code should have EOF POD; modules for developers should have inline POD

    • If you're lucky, your editor will comment POD (cperl-mode in emacs)

  • [perl filter like javadoc- possibly PolyDoc, http://juggler.ucsd.edu/lab_pages/sigs/polydoc/ ]

<< Previous | Index | Next >> Copyright © 2002 Daniel Allen