Object oriented programming in Perl

My Perl Page seem to get hits recently, so it seems Perl programming is still great.

Here I will be showing some keywords on Object Oriented Perl

1. Package – “Package” Keyword defines the name of the class. In Java package is a name of a folder, not to confused.
ex: package Account;

2. sub – “sub” Keyword defines a method ( Java term ) or function ( C term ). A Package should contain a function.
ex: sub newAccount {}

3. @ISA – To create an inheritance, we use the special Perl variable called ISA. sounds more like an “is a”
ex: our @ISA = qw(Account);

See more here at:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s