Overview

Reflection (or introspection) is the process of asking a program about itself as it runs. By treating code as data, we can manage code in the same way that we manage data. That sounds like a truism, but it’s an important insight into modern programming. It’s also a principle behind code generation.

Moose’s Class::MOPThe bundled Class::MOP library of Moose provides a meta-object protocol—a mechanism for creating and manipulating an object system by manipulating objects. simplifies many reflection tasks for object systems. Several other Perl idioms help us inspect and manipulate running programs.

Get hands-on with 1200+ tech skills courses.