Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re^8: Private method variations

by adrianh (Chancellor)
on Mar 02, 2004 at 12:23 UTC ( #333229=note: print w/ replies, xml ) Need Help??

in reply to Re: Re^6: Private method variations
in thread Private method variations

Do I understand you correctly? You would have My:: namespace be like private and Our:: namespace be like protected

No :-)

My:: and Our:: were two alternate names for the same code. On reflection I decided that My:: was probably a poor choice since my is all about scoping lexical variables, while our is about scoping the name of package variables which, from a certain somewhat skewed perspective, is what I'm doing in the code.

Calling the functionality "private" or "protected" is potentially confusing since it doesn't do all the things that "private" and "protected" do. All it does is allow you to conveniently name a package for implementation methods so you can avoid having them interfere with your classes published interface.

Comment on Re^8: Private method variations
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (11)
As of 2015-03-26 22:42 GMT
Find Nodes?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:

    Results (596 votes), past polls