NAME
Getopt::Pad::Util - Helper functions (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.
FUNCTIONS
All functions are exported on request.
- camelize($name)
-
The reader name for an option or arg name: split at dashes and underscores, every part after the first with its first letter upper case (
log-levelbecomeslogLevel). A spec error if the result is not a valid Perl identifier. - isValidName($name)
-
Whether
$nameis a valid option name, alias, arg name or command name: a letter, followed by word characters or dashes. - specError($format, @args)
-
Dies with
Getopt::Pad spec: MESSAGE at FILE line LINE., where FILE and LINE are those of the first caller outside Getopt::Pad, normally theGetOptionscall. - expandTilde($path)
-
Replaces a leading
~(alone or followed by/) with$HOME. Returns the path unchanged whenHOMEis not set. - useColor($handle)
-
Whether output to
$handleshould be colored: it is a terminal,NO_COLORis empty or unset, andTERMis notdumb.
SEE ALSO
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.