kiat has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

I've coded in perl for about a year but have not written any object-oriented perl code. What are the advantages of OO perl over plain perl? Is it the case that for large projects, OO perl is the way to go? Or is it a matter of preference?

Replies are listed 'Best First'.
Re: Perl oo vs plain Perl
by djantzen (Priest) on Nov 17, 2002 at 05:49 UTC
Re: Perl oo vs plain Perl
by pg (Canon) on Nov 17, 2002 at 06:02 UTC
    Here is my two-penny experience:
    • When you work on a project that involves a group of people, OO gives you a more clear way to communicate among team members.
    • OO is such a nature way of thinking, as that's exactly how things are organized and arranged in the real world.
Re: Perl oo vs plain Perl
by samtregar (Abbot) on Nov 17, 2002 at 06:14 UTC
    I think the biggest single reason to learn OO Perl is because most CPAN modules use it. You can save yourself an enormous amount of development time by using the modules on CPAN, more than enough to justify learning OO Perl.

    The best way to learn OO Perl is to buy Damian Conway's Object Oriented Perl. If you read that book and still don't know why you should write OO Perl code then you need more help than we can provide!

    -sam