Getopt::Simple 1.48
Getopt::Simple is a Perl module that provides a simple wrapper around Getopt::Long. SYNOPSIS use Getopt::Simple;
|
|||||||||||||||||||
Getopt::Simple is a Perl module that provides a simple wrapper around Getopt::Long.
SYNOPSIS
use Getopt::Simple;
# Or ...
# use Getopt::Simple qw($switch);
my($options) =
{
help =>
{
type => '',
env => '-',
default => '',
# verbose => '', # Not needed on every key.
order => 1,
},
username =>
{
type => '=s', # As per Getopt::Long.
env => '$USER', # Help text.
default => $ENV{'USER'} || 'RonSavage', # In case $USER is undef.
verbose => 'Specify the username on the remote machine',
order => 3, # Help text sort order.
},
password =>
{
type => '=s',
env => '-',
default => 'password',
verbose => 'Specify the password on the remote machine',
order => 4,
},
};
my($option) = Getopt::Simple -> new();
if (! $option -> getOptions($options, "Usage: testSimple.pl [options]") )
{
exit(-1); # Failure.
}
print "username: $$option{'switch'}{'username'}. n";
print "password: $$option{'switch'}{'password'}. n";
# Or, after 'use Getopt::Simple qw($switch);' ...
# print "username: $$switch{'username'}. n";
# print "password: $$switch{'password'}. n";
Getopt::Simple is a pure Perl module.
The Getopt::Simple module provides a simple way of specifying:
Command line switches
Type information for switch values
Default values for the switches
Help text per switch
Requirements:
tags
Download Getopt::Simple 1.48
Authors software
|
|
|
|
|
|
|
|
Similar software
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Other software in this category
|
|
|
|
|
|
|
|
|
|
Featured Software
jEdit 4.3 pre8
jEdit is an Open Source text editor written in Java
Opera 9.02
Surf the Internet in a safer, faster, and easier way with Opera browser
GNU Aspell 0.60.4
GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell
- Communications
- Database
- Desktop Environment
- Games
- Internet
- Multimedia
- Office
- Programming
- Science and Engineering
- System
- Text Editing&Processing
