NAME
Getopt::Pad::Registry - Looks up types and formats by name (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.
A registry maps names to classes. There are two: one for option types, used through "registerType" in Getopt::Pad::Type, and one for config formats, used through "registerFormat" in Getopt::Pad::Config::Format. They are the only places where a type or format name in a spec is resolved.
METHODS
- new(kind => $kind)
-
$kindnames the registry in messages, such asoption type. - register(@classes)
-
Registers every class under the names its
NAMESconstant lists, in lower case. A class without aNAMESmethod has its module file loaded first, so the built-in classes can be listed by name. A name already registered by another class makesregisterdie; registering the same class again changes nothing. Returns the registry. - resolve($name)
-
The class registered under
$name, matched case-insensitively. An unknown name is a spec error that lists all known names. - knownNames
-
All registered names, sorted.
SEE ALSO
Getopt::Pad::Type, Getopt::Pad::Config::Format
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.