|
| You Say Tomahto, I Say Tomayto |
All the bravado aside, OOP in Perl is somewhat complex, primarily because the language has a somewhat novel way of doing things. The first - and probably the most confusing thing - for a newbie trying to understand the intricacies of Perl objects is the profusion of terms used to describe them. You'll hear about "modules", packages", "classes", "references", "constructors" and a whole lot more...and each will leave you more confused than the last.
For the purposes of this tutorial, we're going to set a few ground rules which might help to simplify your understanding of how Perl objects work.
#1: Central to your understanding of OOP in Perl is the concept of "references". References are covered in detail in this here itty-bitty article.
#2: Once you've got that down, it's time to enter the weird and wonderful world of Perl "packages". For all intents and purposes, "packages", "classes" and "modules" are synonymous with each other (that's a little white lie, but don't let it bother you). Throughout this tutorial, we'll be using the word "packages".
#3: "Methods" and "objects" are thingummies which reside within a package. So are "constructors", "destructors" and "overrides". You don't need to worry about these until we get to the second part of this article.
Cool? OK, let's get started.
 |
How to do Everything with PHP & MySQL
How to do Everything with PHP & MySQL, the best-selling book by Melonfire, explains how to take full advantage of PHP's built-in support for MySQL and link the results of database queries to Web pages. You'll get full details on PHP programming and MySQL database development, and then you'll learn to use these two cutting-edge technologies together. Easy-to-follow sample applications include a PHP online shopping cart, a MySQL order tracking system, and a PHP/MySQL news publishing system..
Read more, or grab your copy now!
|
|