This Advanced Perl training course will allow you to create modules, classes. To write Object Oriented code in the modern way, using Moose, and by using only core Perl, manually blessing references.

It is based on many years of experience teaching Perl, blended with the modern features of Perl and CPAN.

Taking this course will help you maintain existing code and it will teach you how to use modern Perl tools to write new, nice and maintainable Perl code.

Table of Content

Some of the episodes are already available, some are going to be published later on. Some require registrations to the Perl Maven Pro others can be freely accessed by anyone. Some include screencasts, others contain just text.

Libraries and Modules, Packages and Namespaces

  1. Introduction to the Advanced Perl Maven course
  2. Perl 4 libraries
  3. The problem with Perl 4-style libraries
  4. Namespaces or packages
  5. Modules
  6. How does require find the module to be loaded?
  7. What is the difference between require and use? What does import do?
  8. Exporting and importing functions easily
  9. Restrict the import by listing the functions to be imported
  10. Import on demand
  11. Behind the scenes
  12. Tools to package Perl scripts, modules, and application
  13. Distribution directory layout
  14. Makefile.PL of ExtUtils::MakeMaker
  15. Makefile.PL of Module::Install
  16. Build.PL of Module::Build
  17. Changes and README
  18. MANIFEST and MANIFEST.SKIP
  19. Pakcaging a script and a module
  20. Packaging with Makefile.PL
  21. Packaging with Build.PL
  22. test-file
  23. @INC and the namespace hierarchy
  24. How to create a Perl Module for code reuse?
  25. Exporting functions automatically
  26. Packaging modules for distribution
  27. Writing Unit Tests for Perl Modules
  28. Exception handling with eval block
  29. Exception handling with Try::Tiny
  30. Warnings and errors from the users POV with Carp
  31. Throwing exceptions with die and with Exception::Class

Using existing modules

  1. Using standard modules
  2. Installing modules from CPAN
  3. Using CPAN modules

References

  1. Introduction to References
  2. Handling multi-dimensional, complex data structures
  3. Manipulating Complex Data Structures
  4. Reference counting
  5. Debugging data structures
  6. Anonymous arrays and hashes
  7. Subroutine references
  8. Dispatch tables
  9. Handling memory leak
  10. Deep copy of data structures
  11. Static and state variables
  12. Closures
  13. Creating a caching system
  14. Signal handling
  15. Handling warnings in the code
  16. Filtering with grep in Perl
  17. Transforming a perl array using the map function
  18. Array and hash slices
  19. Creating context sensitive functions using wantarray.
  20. Improving speed by using the Schwartzian transformation
  21. Anonymous functions
  22. Memoization
  23. Data serialization
  24. Practical use of function references

Packaging modules for distribution

  1. The directory hierarchy of a CPAN module
  2. Writing Unit Tests for Perl Modules
  3. ExtUtils::MakeMaker
  4. Module::Build
  5. Module::Install
  6. Dist::Zilla

Object Oriented Programming in Perl using raw classes

  1. Constructors and destructors
  2. Attributes, attribute types (members)
  3. Create your own type
  4. Getters/Setters
  5. Inheritance
  6. Polymorphism
  7. Encapsulation
  8. Singleton
  9. Destructor (DESTROY)
  10. OOP: Bless, or what you will see in the wild
  11. OOP: Class::Accessor A small scale object oriented system in Perl
  12. Class methods and Instance methods
  13. Automatic Class creation
  14. Operator overloading

Object Oriented using Moo

See the Moo page

Object Oriented using Moose

See the Moose page

Some other advanced topics

  1. Throwing exceptions in Perl
  2. Catching exceptions in Perl
  3. Always use strict and warnings
  4. Variable declaration in Perl
  5. Symbolic references in Perl
  6. Barewords in Perl
  7. How to handle warnings in an application?
  8. Unknown warnings category
  9. splain and use diagnostics
  10. Fatal warnings
  11. Array and hash slices
  12. splice
  13. AUTOLOAD
  14. BEGIN and END
  15. How to sort faster in Perl - Schwartzian transformation
  16. use autodie
  17. Perl::Critic
  18. Avoid unwanted bitwise operators using Perl::Critic
  19. Perl::Tidy
  20. Saved variable: local
  21. Who is calling? caller
  22. Logging with Log::Dispatch
  23. Time and date with DateTime
  24. Signals and the kill function
  25. default scalar variable of Perl