Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

Perl Object Oriented Meta-Tutorial

This is a meta-tutorial, in that it's meant not to teach the reader how to use objects in Perl, but where to find information about using objects in Perl. This may sound irrelevant or useless, but with the amount of documentation that ships with the standard Perl, a meta-tutorial might be useful--or even necessary.

Think of this as an extended index to various sources of documentation on OO Perl.

Sideways

Before you learn about objects in Perl, you need to be familiar with certain concepts: references, as discussed in perlref and perlreftut (unfortunately, I can't find a working URL for the latter), and modules and packages, as discussed in perlmod. This isn't, of course, necessary if you're just trying to *use* objects (as opposed to writing them, that is).

But it may be helpful all the same.

Introductions

If you're just beginning your OO education by learning OO Perl, you need documentation that presumes no prior knowledge of object-oriented principles. As such, these sources are a good start for any OO beginner:

  • Easy Perl5 Object Intro

    This is short, quick, and to-the-point. The assumption is that you're not necessarily trying to learn how to write OO Perl, just to use it; as the Intro says, the two are very different, and if you're new to OO Perl and just want to use OO modules on CPAN or elsewhere, you shouldn't assume that you need to know anything about how to write OO code-- and this document will tell you everything you need to use it.

  • Beginner's Object-Oriented Tutorial

    This is Randal Schwartz's beginner's tutorial to OO Perl. Its goal is to assume no prior OO knowledge and to give you a good, clear start in using OO in general, and OO Perl specifically. Randal's "animal" example works well for teaching basic the basic principles.

A Modicum of Experience

So you're no longer (or never were?) a beginner to object- oriented programming. Now you need to learn how to do it in Perl. These are a good start.

  • Tom's Object-Oriented Tutorial for Perl

    Tom Christiansen's perltoot is a very solid introduction to using objects in Perl. It assumes familiarity with OO principles (particularly in the sense that it uses OO terms quite liberally), but doesn't assume that you know how to use them in Perl. This, then, is more an introduction to writing OO code in Perl than to writing OO code, in general.

  • Perl Objects

    The basic Perl Objects manpage. Again, this assumes that you know OO concepts, and that you know how Perl references work; but if you know both of those, this is a good place to start.

Advanced

  • Bag'o Object Tricks

    This is an interesting document. I'm placing it in advanced simply because it assumes that you've read the above documents before reading this one. As it says quite clearly, it is not a tutorial--it's meant to give you some ideas and some tricks for object-oriented programming in Perl. Think of this as a big picture, concept-oriented discussion of OO Perl.

All of the Above

  • Object Oriented Perl

    Damian Conway's OO Perl book doesn't fit into any of the above categories, because it works for anyone from a novice to an expert. This is an excellent book.

The Others

There are a good number of other resources on OO programming in Perl; they're not listed above because they're not solely focused on OO.
2005-09-22 jdporter fixed some broken links to old documentation.

In reply to Perl Object Oriented Meta-Tutorial by btrott

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others drinking their drinks and smoking their pipes about the Monastery: (11)
    As of 2014-08-21 13:28 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The best computer themed movie is:











      Results (135 votes), past polls