in reply to characterstics of private in perl

does perl by itself support private data members

No. As paraphrased from Perl's documents, Larry Wall or somone says . . .

Perl objects take a unique approach. Object attributes & methods are private because they asked you not to come into their living room, not because they have a shotgun.

However, there is a convention that many modules use. Typically "private" object attributes and methods are prepended with an underscore. This doesn't force them to be private, but it serves as a signal to let other developers know they shouldn't be tinkering with them.

Replies are listed 'Best First'.
Re: Re: characterstics of private in perl
by tachyon (Chancellor) on Mar 09, 2003 at 11:09 UTC

    Ah no actually. As we all know Perl can do anything. You CAN make stuff completely private in Perl. See Re: characterstics of private in perl. In the sub set_count() add a warn if you want a BB gun, a die if you want a shotgun or, if you want a nuke, you could even make that fork while 1 ;-)

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print