The Practical Extraction Report Language (Perl) is a popular and portable scripting language used by anyone who needs to extract and manipulate data coming from text files, log files, databases, pipes etc. This course is a continuation of the Perl course. The student will be able to use and integrate Perl libraries and modules into his programs, use packages and modules from the standard Perl library, understand Perl references (pointers) for creating more complex data structures (hashes of hashes, multidimensional arrays, etc). Object oriented Perl will be introduced as well as dbm files (database management), and how to create user-friendly documentation.
Benefits
Upon completion of this course, students will be able to:
use packages, libraries, and pragmas
import and export modules
use references (pointers)
use Perl objects
use dbm files (database management)
use plain old documentation (pod)
CGI ( optional )
Intended Audience
This course is recommended for people with Perl experience who want to expand the power of Perl by understanding and using Perl libraries and modules, references, objects, and dbm libraries.
Prerequisites
Students need to be familiar with the basics of Perl programming (data types, decision making constructs, looping constructs, file I/0, subroutines) and how to use a text editor. The Perl course is the best prerequisite.
Training Approach
This is an intensive, interactive course, which is approximately 50% lecture and 50% lab. Questions are highly encouraged. On the final day, students are given access to a zipped file containing all of the solutions to the labs and the examples used throughout the notebook.
Course Outline
Day One
Module 1-- Packages
Review of Perl data types and subroutines
Packages
The symbol table
The strict pragma
Lab Exercise 1
Module 2 -- Libraries and Modules
The Standard Perl Library
Including Perl library routines (.pl files) in a Perl script
The @INC array
Including your subroutines from another directory.
Perl5 modules (.pm files).
The use function
The Exporter Module and the @ISA array
Importing Modules from the Standard Perl Library and CPAN
How to Create your own Module
Lab Exercise 2
Day Two
Module 3 -- References
Symbolic References (aliases and typeglob)
Hard References (Pointers)
Anonymous variables and references
Anonymous Arrays
Anonymous Hash
Nested Data Structures and Pointers
Anonymous subroutines
Multi-dimensional Arrays
Pointers and Subroutines
The ref function
Lab Exercise 3
Module 4 -- Object Oriented Perl
What is OOP?
OOP Terms
Classes
The my function
Creating a Perl object with references
The bless function
Methods
Invoking Methods
Constructors and the new class method
Instance methods
Passing Arguments
Destructors and Garbage Collection
Lab Exercise 4
Day Three
Objects (continued)
OOP Review
Inheritance
The @ISA Array and Calling Methods
Derived Classes
Module 5 -- Perl Documentation
Another look at the Standard Perl Library
POD Files (Plain Old Documentation)
POD Commands
Translating POD Documentation into Text
Translating POD into HTML
Lab Exercise 5
Module 6 -- Tied Variables and DBM Files
Tying Variables to a Class
The tie function
Predefined Methods for Tying
DBM Library Files
What are DBM Files?
Creating and Assigning Data to a Database
Fetching Data
Deleting Data
Lab Exercise 6
For more information, contact:
Tom Wille
TM Associates, Inc.
14420 S. Kelmsley Dr.
Oregon City, OR 97045
503-656-4457
503-656-4775 fax