Name : perl-Getopt-Euclid
| |
Version : 0.4.6
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 150500.1.1
| Date : 2024-06-26 23:27:22
|
Group : Development/Libraries/Perl
| Source RPM : perl-Getopt-Euclid-0.4.6-150500.1.1.src.rpm
|
Size : 0.14 MB
| |
Packager : https://www_suse_com/
| |
Summary : Executable Uniform Command-Line Interface Descriptions
|
Description :
Getopt::Euclid uses your program\'s own POD documentation to create a powerful command-line argument parser. This ensures that your program\'s documented interface and its actual interface always agree.
The created command-line argument parser includes many features such as argument type checking, required arguments, exclusive arguments, optional arguments with default values, automatic usage message, ...
To use the module, simply write the following at the top of your program:
use Getopt::Euclid;
This will cause Getopt::Euclid to be require\'d and its import method will be called. It is important that the import method be allowed to run, so do not invoke Getopt::Euclid in the following manner:
use Getopt::Euclid ();
When the module is loaded within a regular Perl program, it will:
* 1.
locate any POD in the same *.pl file or its associated *.pod file.
* 2.
extract information from that POD, most especially from the \'=head1 REQUIRED ARGUMENTS\' and \'=head1 OPTIONS\' sections,
* 3.
build a parser that parses the arguments and options the POD specifies,
* 4.
remove the command-line arguments from \'AATTARGV\' and parse them, and
* 5.
put the results in the global \'%ARGV\' variable (or into specifically named optional variables, if you request that -- see Exporting option variables).
As a special case, if the module is loaded within some other module (i.e. from within a \'.pm\' file), it still locates and extracts POD information, but instead of parsing \'AATTARGV\' immediately, it caches that information and installs an \'import()\' subroutine in the caller module. This new \'import()\' acts just like Getopt::Euclid\'s own import, except that it adds the POD from the caller module to the POD of the callee.
All of which just means you can put some or all of your CLI specification in a module, rather than in the application\'s source file. See Module interface for more details.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl/SLE_15_SP5/noarch |