Advanced Perl Programming

Summary
The course gives a thorough treatment of packages, modules, libraries, and references so that the students will then have the necessary background to understand objects. A treatment of object orientation follows so that students will be able to understand applications areas through modules such as Tk.pm, DBI.pm, CGI.pm and Socket.pm

Prerequisites
Students should have attended Perl Programming or have equivalent knowledge.

Course Objectives
After completing this course, participants should be able to:
  • Download, install, and use Modules from the Comprehensive Perl Archive Network
  • Use the modules in the Standard Perl Distribution
  • Write POD (Pain Old Documentation) sections of Perl modules.
  • Use Perl references to solve many programming problems including those problems involving arbitrarily complex data structures.
  • Use associative arrays in a wide variety of commonly arising programming solutions
  • Distinguish among packages, modules, libraries, and classes
  • Create objects and reuse classes
  • Write and use modules that implement the object oriented paradigm
  • Write client/server applications using the Socket.pm module
  • Write Graphical User Interfaces (GUIs) in Perl by using the Tk.pm module.
  • Write Perl CGI (Common Gateway Interface) scripts that extend the services provided by Web Servers.
  • Write Perl applications that make queries to real databases through the use of the DBI.pm module.

Length
4 days

Format
Instructor-led course, with many practical computer-based exercises.

Course Outline
  1. What You Should Already Know
    • A quick review of Perl (through a Perl program)
    • Perl Libraries
    • The Standard Perl Libraries
    • Packages
    • Modules
    • Using .pm modules
    • Exporter.pm
    • CPAN
  2. Associative Arrays
    • Associative Arrays as Dual Arrays
    • A Hashing Algorithm
    • Collisions
    • Associative Arrays
    • Sorting by Keys or Values
    • Finding Unique Tokens in a File
    • Reverse Lookups
    • Selecting the top n elements from a list
  3. References And Data Structures
    • Scalar References
    • Array References
    • Hash References
    • Prototypes
    • Higher Dimensional Arrays
    • Complex Hashes
    • References and Subroutines
    • Linked Lists
  4. Object Oriented Programming
    • Modules included with the distribution
    • The Comprehensive Perl Archive Network
    • Object Oriented Vocabulary
    • The class Definition
    • Defining and Using objects
    • Information Hiding
    • Instance Methods
    • Destructors
    • Class methods
    • Inheritance
    • Polymorphism
    • Documenting Perl Code
    • IO.pm
  5. Perl/Tk
    • Widgets
    • Event Driven Programming
    • Geometry Management
    • pack()
    • grid()
    • place()
    • Buttons
    • Checkboxes
    • RadioButtons
    • Label
    • Entry
    • ListBox
    • Scrollbars
    • The Text Widget
    • Menus
    • Frames
    • Top Level Widgets
    • Dialog Boxes
    • Bind
  6. Client/Server Applications Using TCP/IP
    • Client/Server fundamentals
    • A simple Client
    • A simple Server
    • Client Server using Socket.pm
    • Example: a File Server
    • A GUI File Server using the Tk extensions
    • ftp, email, etc
  7. CGI.PM
    • What is CGI
    • What is CGI.pm
    • Creating a CGI object
    • Retrieving Parameter Info
    • Creating the HTTP header and footer
    • start_html()
    • Tags
    • Tables
    • Forms
    • Text Fields
    • Text Areas
    • Passwords
    • CheckBox Group
    • Individual CheckBox
    • RadioButton Group
    • Popup Menu
    • Scrolling List
    • Reset Button
    • Hidden Fields
    • Submit Button
    • Clickable Image
    • JavaScript Buttons
    • Cookies
    • Debugging
  8. Accessing Real Databases In Perl
    • What is DBI
    • A Review of SQL and Relational Databases
    • Accessing A Relational Database
    • Updating Databases with SQL
    • DBI Architecture
    • Handles
    • An Example
    • Executing a Query
    • Retrieving Query Results
    • Other Means of Retrieving Data
    • Binding output Columns
    • Accessing Database Metadata
    • Handling Quotes
    • Debugging BDI programs
    • Error Handling

Hardware and Software Requirements
TBA

Go to course catalogue