OBJECT-ORIENTED PERL– GTPL4

Course Description

This three-day course addresses the Object-Oriented features of Perl and provides students with the knowledge to create Object-Oriented Perl scripts.

^^

Duration

3 days

^^

Target Audience

This course is suitable for perl programmers or developers wanting to fully understand Perl’s OO aspects, also programmers and system administrators.

^^

Course Prerequisites

Programming experience in a structured language, such as C, C++, Java, or COBOL, is required to attend this course as well as an in-depth knowledge of the Perl language.

The skills are taught in the following courses:

If you have any questions or doubts as to whether you meet the pre-requisites for this course, or indeed are wondering which course best suits you, please consult with us to discuss your suitability for course attendance.

^^

Suggested Follow on Courses

There are a number of options of suitable follow-on courses, depending on your business needs. Please contact us for further details.

^^

Course Content

1. Perl Essentials Review

Topics Not Reviewed (But Essential to Understand OOP in Perl)

References

Advanced Data Types

Typeglobs

Packages

Modules

 

2. OO Primer

Introduction to OOP in Perl

Objects

Methods

Classes

Additional OO Terminology

 

3. OO In Perl Essentials

The Basis of OOP in Perl

Class Creation

Method Creation

Object Creation

Calling Methods

Constructors

Accessors

Mutators

Affordances

Class Data

Class Modules

Using AUTOLOAD

Destructors

 

4. Using Bless on Arrays and Scalars

Why Use Other Data Types?

Blessing Arrays

Pseudo-Hashes

Blessing Scalars

 

5. Using Bless on REs, Subroutines and

Typeglobs

Blessing Things Other Than Variables

Blessing Regular Expressions

Blessing Subroutines

Blessing Typeglobs

 

6. Inheritance

Overview of Inheritance in Perl

Determining a Method’s Location

The @ISA Array Works

Inheritance in Other Languages

Perl “Built-In” Methods

Handling DESTROY Methods with

Inheritance

The SUPER Class

Abstract Methods

Polymorphism

 

7. Automating Class Creation

Automating Class Creation Essentials

Using Class::Struct to Crate Classes

Using Arrays Instead of Hashes

Attribute Types

Other Tools to Create Classes

 

8. Ties

What are Ties?

Making a Tied Scalar

Making a Tied Array

Making a Tied Hash

Making a Tied Filehandle

Ties and Inheritance

 

9. Installing CPAN Modules

Introduction to the Concept of

Overloading

Using overload.pm

How Your Overload Subroutines Will

Be Called

Magic Autogeneration

Fallback

 

10. Encapsulation

Overview of Encapsulation

Private Identifiers

Using Closures to Enforce Encapsulation

Other Methods of Encapsulation

^^

See more Linux/Unix courses