NAME
Getopt::Pad::Result::Generator - Creates the classes of result objects (internal)
DESCRIPTION
This module is internal to Getopt::Pad. It is not part of the public API and can change without notice. Programs use "GetOptions" in Getopt::Pad; this page is for people working on Getopt::Pad itself.
Getopt::Pad::Result::Generator::generate($level) returns the name of an Object::Pad class for the result objects of $level. The class inherits from Getopt::Pad::Result and has one :param :reader field, defaulting to undef, per declared option and arg of the level. It is built with Object::Pad::MOP::Class and sealed.
Classes are cached by their set of readers, so repeated parses, and levels with the same readers, share one class. A long-running process that parses many command lines does not keep creating packages. The class names (Getopt::Pad::Result::_1, ...) are not meaningful.
SEE ALSO
Getopt::Pad::Result, Getopt::Pad::Parser
AUTHOR
davenonymous <perl@davenonymous.com>
COPYRIGHT AND LICENSE
Copyright 2026 davenonymous
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.