Object-oriented programming (OOP) is one of the most required features in modern programming languages. In Perl 6, the approach of how previous versions of Perl worked with OOP was completely redesigned. In this chapter, we will learn about creating classes and working with objects in Perl 6. The following will be covered:
- Creating a class
- Class (read and write, public, private, state attributes)
- Class methods (public and private methods)
- Inheritance (inheriting from a class, overriding methods, submethods, multiple inheritance)
- Roles
- Introspection
- Postfix method operators