Name : perl-Getopt-ApacheCommonsCLI
| |
Version : 0.02
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp155.3.1
| Date : 2023-07-20 17:02:31
|
Group : Development/Libraries/Perl
| Source RPM : perl-Getopt-ApacheCommonsCLI-0.02-lp155.3.1.src.rpm
|
Size : 0.02 MB
| |
Packager : https://www_suse_com/
| |
Summary : Perl extension for parsing arguments similar to Apache Commons CLI Java [cut]
|
Description :
Getopt::ApacheCommonsCLI - Perl extension for parsing arguments similar to Apache Commons CLI Java library.
The Apache Commons CLI Java library implements options parsing according to at least 3 different standards:
* 1. Unix
* 2. POSIX (bundling, enabled with OPTIONS_BUNDLING=1 flag)
* 3. Java (-D options with right-to-left argument precedence, enabled with JAVA_DOPTS=1)
Certainly there will be parsing ambiguities. An example is that single-character option bundling and non-spaced single-character option args can be parsed in multiple ways for the same input.
If you need 100% compatibility, then it would be advisable to use the original Apache Commons CLI Java library. However, if \"pretty close\" is adequate, then use this module, or consider submitting a bug report or patch.
Also, as the Getopt::Long module says, \"Note: Using option bundling can easily lead to unexpected results, especially when mixing long options and bundles. Caveat emptor.\"
Here are some definitions for the purpose of this module:
* * \'single-character option\' (ie. -a)
* * \'long option\' is the longest option name or alias for an option (ie. --password)
* * \'short option\' is the shortest option name or alias for an option (usually a single-character option) (ie. -pw)
* * \'Java option\' is a single-character option starting with \'-D\' or \'--D\' and contains \'=\' (ie. -Dabc=xyz)
* * \'bundling\' is combining multiple single-character options after a single dash or double dash. (ie. ls -lat)
This Perl module implements:
* * options can have both a long and short name
* * space or = for trailing option arguments
* * allows single-character options to have a non-spaced trailing arg
* * options that are seen but don\'t take an arg have their value set to 1.
* * does not enable POSIX single-character options bundling by default, defined in OPTIONS_BUNDLING
* * argument assignment precedence is defined in LEFT_TO_RIGHT_ARGS flag, default is from left to right (Java standard is right-to-left)
* * Java options parsing is defined with JAVA_DOPTS, default is disabled
* * customized error message subroutine for missing args.
For multiple-value arguments, either quote or comma-separate them. Read Getopt::Long documentation for more information.
Input specification format is: \"(long-option)|(short-option)[:=]?([fios])?\".
my $result = GetOptionsApacheCommonsCLI(\\AATTspec, \\%opts, \\%options, \\&do_err);
$opts{\'__argv__\'} is the string remaining after GetOpt::Long processing. $opts{\'__errors__\'} is the list of parsing errors.
%options may contain:
AMBIGUITIES (reserved for future use in disambiguating short option names) BUNDLING (default=0, enabled=1 activates Getopt::Long\'s bundling_override) DEBUG (default=0, enabled=1) JAVA_DOPTS (default=0, enabled=1, implies post-processing with OPT_PREC_RIGHT_TO_LEFT for matching options) OPT_PRECEDENCE (default=OPT_PREC_UNIQUE, also OPT_PREC_LEFT_TO_RIGHT and OPT_PREC_RIGHT_TO_LEFT)
Return values
* * Getopt::ApacheCommonsCLI returns 1=for success, 0=failure
* * a list of errors in $opts{\'__errors__\'}
* * AATTARGV contains remainder of command line.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-G/15.5/noarch |