in reply to Re: Re: "use strict;" woes
in thread "use strict;" woes

If I'm guilty of it, then so is Larry Wall (yes, perlstyle specifically addresses this point).

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

Note: All code is untested, unless otherwise stated

Replies are listed 'Best First'.
Re: Re: Re: Re: "use strict;" woes
by Anonymous Monk on Oct 14, 2003 at 18:27 UTC
    • You didn't say: Larry's preference, you said "generally"
    • Larry does not explicitly address that in perlstyle. (note, LW's style notes are only the first portion of that doc, the latter portion is other's (largely Tom Christiansen).
    • One part of that document *does* explicitly address using case to indicate scope, and it suggests all caps for *constants*, and mixed case for package globals (the case at hand).
    • As many people in the community use MixedCase as use underscores to separate "words" in identifiers.
    Your way is in no way the general way, or even the recommended perlstyle way.
      This is from perlstyle:
      While short identifiers like $gotit are probably ok, use underscores to separate words. It is generally easier to read $var_names_like_this than $VarNamesLikeThis, especially for non-native speakers of English. It's also a simple rule that works consistently with VAR_NAMES_LIKE_THIS.
      hardburn's advice is solid, helpful, and appreciated. Your advice is ... what is the point of your advice? That even though hardburn's advice was good, it is opinionated? So what? It's ALL opinion! At least i know who hardburn is. Who are you? Generally speaking, of course.

      jeffa

      L-LL-L--L-LL-L--L-LL-L--
      -R--R-RR-R--R-RR-R--R-RR
      B--B--B--B--B--B--B--B--
      H---H---H---H---H---H---
      (the triplet paradiddle with high-hat)
      
        And from just below your quote in perlstyle:
        o You may find it helpful to use letter case to indicate the scope or nature of a variable. For example: $ALL_CAPS_HERE constants only (beware clashes with perl va +rs!) $Some_Caps_Here package-wide global/static $no_caps_here function scope my() or local() variables
        My point is simply that what hardburn said was the general way is not the general way.