I personally struggled for a long time to grasp OOP, and then OOP in Perl. About two years. I don't have any formal training in computer science, but knew it was an important concept to try to learn. I read all the perldocs. I read the Conway book. But I just needed something with short clear examples that did not contain the distracting "humor" that seems to be part of the culture around Perl.
In the end I finally found The One that did it for me:
Tutorial: Introduction to Object-Oriented Programming. Its in the
Tutorial section here, which was mentioned by the first poster - but there are 21 others. This one is wonderfully clear and the examples are very clean and straight forward. The ensuing conversation elucidates the pitfalls in the presented material beautifully and concisely. As a bonus, a lengthy portion of the conversation also covers inside-out objects in Perl.
Using what was written there I wrote my first completely OOP database driven web application... and I loved the result. There was a lot more code to write, but the maintainability trade-off was very worthwhile. My complements to
jreades!
Robert Browning on being asked what some line in one of his poems meant said
'When I wrote it only God and Robert Browning knew. Now only God knows.'
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
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, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.