Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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.

¤

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://187612]
help
Chatterbox?
[rajuskark]: how to delete my question from perlmonk

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2017-03-23 05:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (281 votes). Check out past polls.