About Object-Oriented Perl

D

Davy

Hi all,

I am a Perl newbie and familiar with subroutine and reference. And I
want to use Perl's OO feature to encapsulate the private data and
private function. I just need the encapsulation and don't need
inheritance.
And I read perlboot and perltoot, but it is too complex for me. Is
there any simple but complete tutorial and example on encapsulation
feature of Perl's OO?

Thanks!
Davy
 
A

anno4000

Davy said:
Hi all,

I am a Perl newbie and familiar with subroutine and reference. And I
want to use Perl's OO feature to encapsulate the private data and
private function. I just need the encapsulation and don't need
inheritance.
And I read perlboot and perltoot, but it is too complex for me. Is
there any simple but complete tutorial and example on encapsulation
feature of Perl's OO?

There's a lot more literature on Perl OO, but it doesn't get less
complex than perltoot. Build the Person class described in it and
play with it.

For a comprehensive treatment see _Object Oriented Perl_ by Damian
Conway.

Anno
 
U

usenet

Davy said:
And I read perlboot and perltoot, but it is too complex for me.

I also did not find these tutorials very helpful. Others have, but not
everybody benefits equally from the same material. There's more than
one way to explain it.

I think you might benefit (as did I) from Chapter 11 of Simon Cozens'
book, "Beginning Perl" which you may read online for free (legally) in
Acrobat format at

http://www.perl.org/books/beginning-perl

When I read this, the whole OO thing finally 'clicked' for me. You
might find other chapters informative as well.

Welcome to Perl - you won't regret learning it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top