YAPC::NA 2004 Perl Style Guides for Large Projects #16

Slash Style Guide: Coding Principles 2

  • Always:

    • pass arrays and hashes by reference, not by value

    • use @_ instead of shift because it is faster.

    • check system call return values

    • write tests

      • <<This is all they say about tests; see later>>

  • Never:

    • use globals where a lexical or local will work

    • use __END__ or __DATA__ because they break mod_perl.

    • use die() or exit() ever in slash web-based programs.

      • (slash doesn't explicitly talk about exception handling)

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