Logo         Community
  Trog
Services
The Company
Community
Columns
Your Account
Contact Us
 
 
Object-Oriented Programming In Perl (part 1)
A light-hearted look at some basic OO concepts in Perl.

| 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!


previous page more like this  print this article  next page
 
Search...
 
In trog...
Logging With PHP
Building A Quick-And-Dirty PHP/MySQL Publishing System
Output Buffering With PHP
Date/Time Processing With PHP
Creating Web Calendars With The PEAR Calendar Class
more...
 
In the hitg report...
Crime Scenes
Animal Attraction
Lord Of The Strings
more...
 
In boombox...
Patience - George Michael
Think Tank - Blur
My Private Nation - Train
more...
 
In colophon...
Hostage - Robert Crais
The Dead Heart - Douglas Kennedy
Right As Rain - George Pelecanos
more...
 
In cut!...
American Chai
The Core
Possession
more...
 
Find out how you can use this article on your own Web site!


Copyright © 1998-2018 Melonfire. All rights reserved
Terms and Conditions | Feedback