Getopt::DeclareGetopt::Declare is a Perl module with Declaratively Expressed Command-Line Arguments via Regular Expressions. | |
Download |
Getopt::Declare Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Damian Conway
- Publisher web site:
- http://search.cpan.org/~dconway/
Getopt::Declare Tags
Getopt::Declare Description
Getopt::Declare is a Perl module with Declaratively Expressed Command-Line Arguments via Regular Expressions. Getopt::Declare is a Perl module with Declaratively Expressed Command-Line Arguments via Regular Expressions.SYNOPSIS use Getopt::Declare; $args = Getopt::Declare->new($specification_string, $optional_source); # or: use Getopt::Declare $specification_string => $args;Getopt::Declare is yet another command-line argument parser, one which is specifically designed to be powerful but exceptionally easy to use.To parse the command-line in @ARGV, one simply creates a Getopt::Declare object, by passing Getopt::Declare::new() a specification of the various parameters that may be encountered: use Getopt::Declare; $args = Getopt::Declare->new($specification);This may also be done in a one-liner: use Getopt::Declare, $specification => $args;The specification is a single string such as this: $specification = q( -a Process all data -b < N:n > Set mean byte length threshold to { bytelen = $N; } +c < FILE > Create new file --del Delete old file { delold() } delete e < H:i >x< W:i > Expand image to height < H > and width < W > { expand($H,$W); } -F < file >... Process named file(s) { defer {for (@file) {process()}} } =getrand Get a random number (or, optionally, < N > of them) { $N = 1 unless defined $N; } -- Traditionally indicates end of arguments { finish }Requirements:· Perl Requirements: · Perl
Getopt::Declare Related Software