Changes for version 0.04 - 2026-09-26
- Config files set the options of every command level: the commands key of a level's section holds one section per command, nested like the commands. Every section is validated on every run, the values only on the levels the command line selects. The autoload chain merges option by option per level
- --create-default-config writes the defaults of every level
- Add inherit to option specs: on a level with commands, the option is also accepted after the command word on every level below and read from the declaring level. Given on several levels, it combines as if repeated on one
- --config and --create-default-config are inherited, so they work after the command word. No level may declare an option of either name when the spec has a config block
- With a config block, a level with commands may not have a group named commands
- Rewrite the documentation. Getopt::Pad is a complete reference with a list of all messages. Getopt::Pad::Tutorial and Getopt::Pad::Cookbook are new. The contracts for custom types and config formats are documented in Getopt::Pad::Type and Getopt::Pad::Config::Format
- New examples for value shapes, config files and value checks
Documentation
Recipes for common command line tasks with Getopt::Pad
A step-by-step introduction to Getopt::Pad
Modules
Declarative command line parsing with types, subcommands and config files
Shell completion scripts and their answers (internal)
Reads and writes config files (internal)
Base class of config file formats, and how to add one
The json config file format
The yaml config file format
The exception for user errors (internal)
The exception that ends a parse successfully (internal)
Renders the help and version output of one level (internal)
Parses a command line against a spec (internal)
Looks up types and formats by name (internal)
The object GetOptions returns
Creates the classes of result objects (internal)
The checked spec of one GetOptions call (internal)
One positional arg of a spec (internal)
The checked config block of a spec (internal)
One level of a spec: the top level or one command (internal)
One option of a spec, and how its value is resolved (internal)
Base class of option types, and how to write your own
The dir option type
The file option type
The float option type
The int option type
Base class of the numeric option types
Base class of the file and dir option types
The url option type
Helper functions (internal)