Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Re: Object Oriented Programming in Perl.

by frankus (Priest)
on Aug 05, 2002 at 09:42 UTC ( #187612=note: print w/ replies, xml ) Need Help??


in reply to Re: Object Oriented Programming in Perl.
in thread Object Oriented Programming in Perl.

I think it's conventional to put an underscore before your object variable names too, eg _beverage.

Erm, that's only for private properties, the rest are not prefixed with an underbar.
From perltoot:

Occasionally you'll see method names beginning or ending with an underscore or two. This marking is a convention indicating that the methods are private to that class alone and sometimes to its closest acquaintances, its immediate subclasses. But this distinction is not enforced by Perl itself. It's up to the programmer to behave.

I feel your statement is misleading. New developers could use underbar incorrectly in their own code, and using other folks modules.

--

Brother Frankus.

¤


Comment on Re: Re: Object Oriented Programming in Perl.
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2014-12-27 23:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls