Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Object Oriented Programming in Perl

September 28, 1998

Okay, let's now take a look at how Object Oriented Design is implemented in Perl 5. Fortunately, the implementation is much easier to get than the theory.

In Perl 5, as in most other OOP languages, the basic unit of encapsulation is the object.

Each Perl 5 object is described by a class that defines its methods (Perl subroutines) and fields (regular Perl variables). Classes may be inherited from and instantiated.

Instantiated objects in Perl are simply references that have knowledge of which class they belong to.

Since object methods are simply Perl subroutines, polymorphism can be handled by discerning what type of information is passed to the subroutine.

Let's look at the innards though. It will be more clear when we can see how this thing actually works.

Polymorphism
Introduction to Perl 5 | Table of Contents
Defining a Class



Up to => Home / Authoring / Languages / Perl / 5




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers