Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Constant names come into conflict with Perl style? (_)

by tye (Cardinal)
on Feb 07, 2007 at 23:18 UTC ( #598905=note: print w/ replies, xml ) Need Help??


in reply to Constant names come into conflict with Perl style?

"SOMETHING_ELSE" isn't all upper case. I also think best practices indicate that you should avoid all-lower-case subroutine names because conflicts there are even more likely (unless you prefix your subroutine calls with &, something that likely gets you yelled at, usually for silly reasons such as "looks like Perl 4").

If you can't think of a multi-word name for your constants, you could go with a Hungarian-ish lower-case prefix like "cDEBUG", as "DEBUG" certainly seems like something a future version of Perl might make use of. (:

- tye        


Comment on Re: Constant names come into conflict with Perl style? (_)
Download Code
Re^2: Constant names come into conflict with Perl style? (_)
by ChemBoy (Priest) on Feb 09, 2007 at 04:59 UTC

    Better yet, the Apps-Hungarian-ish bDEBUG (except I think "b" was "bytes", not "boolean").



    If God had meant us to fly, he would *never* have given us the railroads.
        --Michael Flanders

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://598905]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (13)
As of 2015-07-06 22:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (83 votes), past polls