getopt plus 0.98
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 437
Getopt::Plus 0.98
Getopt::Plus is a Perl module with options wrapper with standard options, help system and more. more>>
Getopt::Plus is a Perl module with options wrapper with standard options, help system and more.
FILE_SIZE_HUMAN
Map from file size in bytes to human name, as hashref, keys being name (full name, lowercase, no trailing s) and abbrev (one/two-letter abbreviation).
Option Types
Permissable values to the type field of an option specifier.
OPT_FLOAT
OPT_INT
OPT_STRING
OPT_FDLEVEL
OPT_BOOLEAN
Error Codes
ERR_OK
Not an error at all. Hence the name.
ERR_ABNORMAL
Not so much an error as a non-erroneous circumstance worthy of signalling, e.g., grep finding no matches.
ERR_UTILITY
Again, not really an error, rather a utility function being called --- e.g., the --help or --version. This gets an error code because it is almost certainly an error to call from batch scripts.
ERR_USAGE
The program was called wrong.
ERR_IO_READ
Some problem reading from disk or network (system read).
ERR_IO_WRITE
Some problem writing to disk or network (system write).
ERR_DB_READ
Some problem reading from db or similar (application read).
ERR_DB_WRITE
Some problem writing to db or similar (application write).
ERR_EXTERNAL
Some problem with an external application.
ERR_INTERNAL
An internal logic error (the sort of thing that should never happen, but has been caught by an internal assertion or sanity check).
ERR_INPUT
Some problem with the input file (which was read fine, but contains bad data).
<<lessFILE_SIZE_HUMAN
Map from file size in bytes to human name, as hashref, keys being name (full name, lowercase, no trailing s) and abbrev (one/two-letter abbreviation).
Option Types
Permissable values to the type field of an option specifier.
OPT_FLOAT
OPT_INT
OPT_STRING
OPT_FDLEVEL
OPT_BOOLEAN
Error Codes
ERR_OK
Not an error at all. Hence the name.
ERR_ABNORMAL
Not so much an error as a non-erroneous circumstance worthy of signalling, e.g., grep finding no matches.
ERR_UTILITY
Again, not really an error, rather a utility function being called --- e.g., the --help or --version. This gets an error code because it is almost certainly an error to call from batch scripts.
ERR_USAGE
The program was called wrong.
ERR_IO_READ
Some problem reading from disk or network (system read).
ERR_IO_WRITE
Some problem writing to disk or network (system write).
ERR_DB_READ
Some problem reading from db or similar (application read).
ERR_DB_WRITE
Some problem writing to db or similar (application write).
ERR_EXTERNAL
Some problem with an external application.
ERR_INTERNAL
An internal logic error (the sort of thing that should never happen, but has been caught by an internal assertion or sanity check).
ERR_INPUT
Some problem with the input file (which was read fine, but contains bad data).
Download (0.046MB)
Added: 2006-11-02 License: Perl Artistic License Price:
1087 downloads
Getopt::Lucid 0.16
Getopt::Lucid is a clear, readable syntax for command line processing. more>>
Getopt::Lucid is a clear, readable syntax for command line processing.
SYNOPSIS
use Getopt::Lucid qw( :all );
# basic option specifications with aliases
@specs = (
Switch("version|V"),
Counter("verbose|v"),
Param("config|C"),
List("lib|l|I"),
Keypair("define"),
Switch("help|h")
);
$opt = Getopt::Lucid->getopt( @specs );
$verbosity = $opt->get_verbose;
@libs = $opt->get_lib;
%defs = $opt->get_define;
%all_options = $opt->options;
# advanced option specifications
@adv_spec = (
Param("input")->required, # required
Param("mode")->default("tcp"), # defaults
Param("host")->needs("port"), # dependencies
Param("port", qr/d+/ )->required, # regex validation
Param("config", sub { -r } ), # custom validation
Param("help")->anycase, # case insensitivity
);
# example with a config file
use Config::Std;
if ( -r $opt->get_config ) {
read_config( $opt->get_config() => my %config_hash );
$opt->merge_defaults( $config_hash{} );
}
The goal of this module is providing good code readability and clarity of intent for command-line option processing. While readability is a subjective standard, Getopt::Lucid relies on a more verbose, plain-English option specification as compared against the more symbolic approach of Getopt::Long.
Main features:
- Five option types: switches, counters, parameters, lists, and keypairs
- Three option styles: long, short (including bundled), and bare (without dashes)
- Specification of defaults, required options and option dependencies
- Validation of options with regexes or subroutines
- Negation of options on the command line
- Support for parsing any array, not just the default @ARGV
- Incorporation of external defaults (e.g. from a config file) with user control of precedence
<<lessSYNOPSIS
use Getopt::Lucid qw( :all );
# basic option specifications with aliases
@specs = (
Switch("version|V"),
Counter("verbose|v"),
Param("config|C"),
List("lib|l|I"),
Keypair("define"),
Switch("help|h")
);
$opt = Getopt::Lucid->getopt( @specs );
$verbosity = $opt->get_verbose;
@libs = $opt->get_lib;
%defs = $opt->get_define;
%all_options = $opt->options;
# advanced option specifications
@adv_spec = (
Param("input")->required, # required
Param("mode")->default("tcp"), # defaults
Param("host")->needs("port"), # dependencies
Param("port", qr/d+/ )->required, # regex validation
Param("config", sub { -r } ), # custom validation
Param("help")->anycase, # case insensitivity
);
# example with a config file
use Config::Std;
if ( -r $opt->get_config ) {
read_config( $opt->get_config() => my %config_hash );
$opt->merge_defaults( $config_hash{} );
}
The goal of this module is providing good code readability and clarity of intent for command-line option processing. While readability is a subjective standard, Getopt::Lucid relies on a more verbose, plain-English option specification as compared against the more symbolic approach of Getopt::Long.
Main features:
- Five option types: switches, counters, parameters, lists, and keypairs
- Three option styles: long, short (including bundled), and bare (without dashes)
- Specification of defaults, required options and option dependencies
- Validation of options with regexes or subroutines
- Negation of options on the command line
- Support for parsing any array, not just the default @ARGV
- Incorporation of external defaults (e.g. from a config file) with user control of precedence
Download (0.039MB)
Added: 2007-01-16 License: Perl Artistic License Price:
1012 downloads
Tk::Getopt 0.49
Tk::Getopt is a user configuration window for Tk with interface to Getopt::Long. more>>
Tk::Getopt is a user configuration window for Tk with interface to Getopt::Long.
SYNOPSIS
use Tk::Getopt;
@opttable = ([opt1, =s, default], [opt2, !, 1], ...);
$opt = new Tk::Getopt(-opttable => @opttable,
-options => %options,
-filename => "$ENV{HOME}/.options");
$opt->set_defaults; # set default values
$opt->load_options; # configuration file
$opt->get_options; # command line
$opt->process_options; # process callbacks, check restrictions ...
print $options->{opt1}, $options->{opt2} ...;
...
$top = new MainWindow;
$opt->option_editor($top);
or using a Getopt::Long-like interface
$opt = new Tk::Getopt(-getopt => [help => $HELP,
file:s => $FILE,
foo! => $FOO,
num:i => $NO,
]);
or an alternative Getopt::Long interface
%optctl = (foo => $foo,
bar => $bar);
$opt = new Tk::Getopt(-getopt => [%optctl, "foo!", "bar=s"]);
Tk::Getopt provides an interface to access command line options via Getopt::Long and editing with a graphical user interface via a Tk window.
Unlike Getopt::Long, this package uses a object oriented interface, so you have to create a new Tk::Getopt object with new. Unlike other packages in the Tk hierarchy, this package does not define a Tk widget. The graphical interface is calles by the method option_editor.
After creating an object with new, you can parse command line options by calling get_options. This method calls itself Getopt::Long::GetOptions.
<<lessSYNOPSIS
use Tk::Getopt;
@opttable = ([opt1, =s, default], [opt2, !, 1], ...);
$opt = new Tk::Getopt(-opttable => @opttable,
-options => %options,
-filename => "$ENV{HOME}/.options");
$opt->set_defaults; # set default values
$opt->load_options; # configuration file
$opt->get_options; # command line
$opt->process_options; # process callbacks, check restrictions ...
print $options->{opt1}, $options->{opt2} ...;
...
$top = new MainWindow;
$opt->option_editor($top);
or using a Getopt::Long-like interface
$opt = new Tk::Getopt(-getopt => [help => $HELP,
file:s => $FILE,
foo! => $FOO,
num:i => $NO,
]);
or an alternative Getopt::Long interface
%optctl = (foo => $foo,
bar => $bar);
$opt = new Tk::Getopt(-getopt => [%optctl, "foo!", "bar=s"]);
Tk::Getopt provides an interface to access command line options via Getopt::Long and editing with a graphical user interface via a Tk window.
Unlike Getopt::Long, this package uses a object oriented interface, so you have to create a new Tk::Getopt object with new. Unlike other packages in the Tk hierarchy, this package does not define a Tk widget. The graphical interface is calles by the method option_editor.
After creating an object with new, you can parse command line options by calling get_options. This method calls itself Getopt::Long::GetOptions.
Download (0.022MB)
Added: 2006-11-03 License: Perl Artistic License Price:
1085 downloads
Getopt::Simple 1.48
Getopt::Simple is a Perl module that provides a simple wrapper around Getopt::Long. more>>
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
<<lessSYNOPSIS
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
Download (0.008MB)
Added: 2006-11-03 License: Perl Artistic License Price:
1085 downloads
Getopt::Helpful 0.04
Getopt::Helpful is an integrated option hash / help messages. more>>
Getopt::Helpful is an integrated option hash / help messages.
STATE
This module is still under development, but is being publish on CPAN to satisfy some code which depends on it. The interface may change in a future version and some of the functionality is not yet complete.
SYNOPSIS
This module provides methods which integrate help messages into a Getopt::Long option spec. This gathers documentation and declaration into one place and allows you to utilize perl code to state the default values of options in your online help messages (helping you utilize the single-point-of-truth principle.)
Additionally, it provides DWIM methods (Get) which allow you to cut some standard error-checking code from your scripts. There is even a handy usage() method which eliminates that silly block of code from the beginning.
#!/usr/bin/perl
use warnings;
use strict;
use Getopt::Helpful;
my $var1 = "default";
my $req_arg;
# declare this as our or $main::verbose
our $verbose = 0;
# every option must be passed into the constructor...
my $hopt = Getopt::Helpful->new(
usage => CALLER [options],
[
var=s, $default,
,
"setting for $var1 (default: $var1)"
],
[
a|arg, $req_arg,
,
required argument
],
+verbose,
+help,
);
# call GetOptions() behind the scenes (with error-checking)
$hopt->Get();
$req_arg or ($req_arg = shift);
# usage() called with a message results in non-zero exit code
$req_arg or $hopt->usage(missing required argument);
$verbose and warn "doing stuff nown";
# now do stuff...
<<lessSTATE
This module is still under development, but is being publish on CPAN to satisfy some code which depends on it. The interface may change in a future version and some of the functionality is not yet complete.
SYNOPSIS
This module provides methods which integrate help messages into a Getopt::Long option spec. This gathers documentation and declaration into one place and allows you to utilize perl code to state the default values of options in your online help messages (helping you utilize the single-point-of-truth principle.)
Additionally, it provides DWIM methods (Get) which allow you to cut some standard error-checking code from your scripts. There is even a handy usage() method which eliminates that silly block of code from the beginning.
#!/usr/bin/perl
use warnings;
use strict;
use Getopt::Helpful;
my $var1 = "default";
my $req_arg;
# declare this as our or $main::verbose
our $verbose = 0;
# every option must be passed into the constructor...
my $hopt = Getopt::Helpful->new(
usage => CALLER [options],
[
var=s, $default,
,
"setting for $var1 (default: $var1)"
],
[
a|arg, $req_arg,
,
required argument
],
+verbose,
+help,
);
# call GetOptions() behind the scenes (with error-checking)
$hopt->Get();
$req_arg or ($req_arg = shift);
# usage() called with a message results in non-zero exit code
$req_arg or $hopt->usage(missing required argument);
$verbose and warn "doing stuff nown";
# now do stuff...
Download (0.011MB)
Added: 2006-10-28 License: Perl Artistic License Price:
1091 downloads
Getopt::Popt 0.02
Getopt::Popt is a Perl interface to the popt(3) library. more>>
Getopt::Popt is a Perl interface to the popt(3) library.
SYNOPSIS
use Getopt::Popt qw(:all);
# setup the options array
push @options,new Getopt::Popt::Option(
longName => "long",
shortName => "l",
argInfo => POPT_ARG_STRING,
arg => $qux,
val => $val);
# or, if youre lazy, have Getopt::Popt automagically do the new()
push @options, { shortName => s,
argInfo => POPT_ARG_NONE,
arg => $quux,
val => s
};
# "val"s can be a single character or an integer:
push @options, { longName => xor,
argInfo => POPT_ARG_VAL | POPT_ARGFLAG_XOR,
arg => $quuux,
val => 0xbadf00d # integer
},
Enable automatic help/usage messages (--help or --usage):
push @options, POPT_AUTOHELP;
Create a new popt context:
$popt = new Getopt::Popt(name => $alias_name,
argv => @ARGV,
options => @options,
flags => $flags);
Setup option aliases:
# load some aliases
$popt->readDefaultConfig();
$popt->readConfigFile("/path/to/aliases");
# add your own alias
$alias = new Getopt::Popt::Alias(longName => "taco",
argv => [qw(--flavored --kisses)]);
$popt->addAlias($alias, $alias_flags);
Load options as you would in C:
# loop through the options, using the popt C way:
while(($rc = $popt->getNextOpt()) > 0) {
...
# one way to get the arg val
$bork = $popt->getOptArg();
...
# stuff some args
$popt->stuffArgs(qw(-q -u -x));
...
# start over
$popt->resetContext();
...
}
And handle errors as you would in C:
$errstr = $popt->strerror($rc);
$badopt = $popt->badOption($rc,$badopt_flags);
Or try the new perly way:
eval {
while(defined($val = $popt->getNextOptChar())) {
^^^^-- note!
# $val is a Scalar::Util::dualvar:
if($val eq "c") { # getArgs();
<<lessSYNOPSIS
use Getopt::Popt qw(:all);
# setup the options array
push @options,new Getopt::Popt::Option(
longName => "long",
shortName => "l",
argInfo => POPT_ARG_STRING,
arg => $qux,
val => $val);
# or, if youre lazy, have Getopt::Popt automagically do the new()
push @options, { shortName => s,
argInfo => POPT_ARG_NONE,
arg => $quux,
val => s
};
# "val"s can be a single character or an integer:
push @options, { longName => xor,
argInfo => POPT_ARG_VAL | POPT_ARGFLAG_XOR,
arg => $quuux,
val => 0xbadf00d # integer
},
Enable automatic help/usage messages (--help or --usage):
push @options, POPT_AUTOHELP;
Create a new popt context:
$popt = new Getopt::Popt(name => $alias_name,
argv => @ARGV,
options => @options,
flags => $flags);
Setup option aliases:
# load some aliases
$popt->readDefaultConfig();
$popt->readConfigFile("/path/to/aliases");
# add your own alias
$alias = new Getopt::Popt::Alias(longName => "taco",
argv => [qw(--flavored --kisses)]);
$popt->addAlias($alias, $alias_flags);
Load options as you would in C:
# loop through the options, using the popt C way:
while(($rc = $popt->getNextOpt()) > 0) {
...
# one way to get the arg val
$bork = $popt->getOptArg();
...
# stuff some args
$popt->stuffArgs(qw(-q -u -x));
...
# start over
$popt->resetContext();
...
}
And handle errors as you would in C:
$errstr = $popt->strerror($rc);
$badopt = $popt->badOption($rc,$badopt_flags);
Or try the new perly way:
eval {
while(defined($val = $popt->getNextOptChar())) {
^^^^-- note!
# $val is a Scalar::Util::dualvar:
if($val eq "c") { # getArgs();
Download (0.021MB)
Added: 2007-03-07 License: Perl Artistic License Price:
963 downloads
edonkey plus 0.01
edonkey plus is a free program peer to peer for the peer to peer network edonkey 2000,overnet etc. more>>
edonkey plus is a free program peer to peer (P2P) for the peer to peer network Edonkey 2000, Overnet etc.
Basic aMule Tips
- NEVER run aMule as root.
- If you are behind a firewall or router, be sure that the ports have been opened. The default ports are 4662 (TCP). 4665 (UDP) and 4672 (UDP). If these are blocked, you will receive a "LowID" which results in fewer available sources for the files you are downloading.
- Obtain an appropriate server.met: e.g., if you are a dialup, using a large server list is not appropiate.
- Set your temp and shared directories in Preferences->Directories
- To recursively select a certain directory, right-click over it.
- You should *NOT* share
- Your temp download directory!
- Your /etc directory
- Probably not your /var, /lib, /boot, or /usr directory
- Certainly make sure that any really confidential files (password files, private SSH keys, credit card numbers :) are *not* shared. So generally do not share your entire home directory, although you might want to share some files or directories in it.
- Remember that you get certain download priveledges with those clients (aMule, eMule, etc users) to whom you upload files, in the form of reduced queue waits.
- Please note that compilation with optimizations is supported. However, if you pull a Gentoo, we will probably just tell you to recompile aMule and/or your system with sane compiler-flags before we will attempt to address the problem.
<<lessBasic aMule Tips
- NEVER run aMule as root.
- If you are behind a firewall or router, be sure that the ports have been opened. The default ports are 4662 (TCP). 4665 (UDP) and 4672 (UDP). If these are blocked, you will receive a "LowID" which results in fewer available sources for the files you are downloading.
- Obtain an appropriate server.met: e.g., if you are a dialup, using a large server list is not appropiate.
- Set your temp and shared directories in Preferences->Directories
- To recursively select a certain directory, right-click over it.
- You should *NOT* share
- Your temp download directory!
- Your /etc directory
- Probably not your /var, /lib, /boot, or /usr directory
- Certainly make sure that any really confidential files (password files, private SSH keys, credit card numbers :) are *not* shared. So generally do not share your entire home directory, although you might want to share some files or directories in it.
- Remember that you get certain download priveledges with those clients (aMule, eMule, etc users) to whom you upload files, in the form of reduced queue waits.
- Please note that compilation with optimizations is supported. However, if you pull a Gentoo, we will probably just tell you to recompile aMule and/or your system with sane compiler-flags before we will attempt to address the problem.
Download (4.3MB)
Added: 2007-07-09 License: GPL (GNU General Public License) Price:
844 downloads

imetal 0.98
imetal is professionally designed as a port of the imetal OSX theme created by AndyBlac . more>>
imetal 0.98 is professionally designed as a port of the imetal OSX theme created by AndyBlac . It uses the pixbuf engine so it's a little slow, but i couldn't make an accurate port without it. Now that Azel is finaly completed and released, i managed to update imetal too ...
There is only one theme now, if you want to use global menu with it , just open the gtkrc file found inside the theme folder and change the line (it's near the end) : include "Tweaks/tweaks.rc" to, include "Tweaks/globalmenu-tweaks.rc" and reload the theme. In order to extract the archive , change the suffix to tar.gz .
Enhancements:
- Fixed a bug (introduced in v0.97) where empty lists had a blue color.
- Evolution vertical mail preview mode list headers fixed.
- Thunar home toolbar button is now properly skinned.
<<less
Added: 2008-04-09 License: GPL Price: FREE
1 downloads
Getopt::ExPar 0.01
Getopt::ExPar contains extended parameters command line parser. more>>
Getopt::ExPar contains extended parameters command line parser.
SYNOPSIS
use Getopt::ExPar;
my(@PDT, @MM, %OPT);
ExPar @PDT, @MM, $OPT;
EXPORT
use Getopt::ExPar exports the sub ExPar into your name space.
ExPar is a perl5 module used to parse command line parameters. This package uses the @PDT, Parameter Description Table, and the @MM, Message Module, to return %OPT which is a hash reference containing the command line option data. The function of Getopt::ExPar is based on Getopt::EvaP, created by Stephen O. Lidie.
Introduction
The ExPar function parses a perl command line. Using the option definitions in the @PDT, argument types are checked and the arguments themselves may be checked against a specified range or pattern. By using both @PDT and @MM, several types of help may be retured to the user. ExPar handles command lines with this format:
command [-parameters] [file_list]
where any parameters and file_list are optional.
Parameter Description Table (PDT) Syntax
Here is the PDT syntax. Optional constructs are enclosed in [], and the | character separates possible values in a list.
PDT [program_name, alias]
[parameter_name[, alias]: type [pattern | range] [ = [default_variable,] default_value]]
PDTEND [flag_list]
flag_list is one or more of the following flags: optional_file_list | required_file_list | no_file_list: specifies condition of list of files at end of command line. (only one of these may be specified) abbreviations: allows for abbreviations of commands or aliases as long as enough of the command is given to make it distinguishable from all others. If not, a message is printed so the user may be more specific. switchglomming: allows for multiple single-letter switch options to be specified as single option (must be first option). pdt_warnings: for debugging a @PDT, it prints out messages that are not necessarily errors, like inconsistent number of default values in a list, etc.
The default_variable is an environment variable - see the section Usage Notes for complete details.
So, the simplest possible PDT would be:
PDT
PDTEND
This PDT would simply define a -help switch for the command, but is rather useless.
A typical PDT would look more like this:
PDT frog
number, n: integer = 1
chars, c: string = "default_string"
PDTEND no_file_list
This PDT, for command frog, defines two parameters, number (or n), of type integer with a default value of 1, and chars (or c), of type string with a default value of "default_string". The PDTEND no_file_list indicator indicates that no trailing file_list can appear on the command line. Of course, the -help switch is defined automatically.
Each of these options may be further refined by using a range and a pattern, respectively:
PDT frog
number, n: integer (((#100, the # is implied. Other simple conditions are < and == (a single = is accepted as ==, not an assignment). Ex: This condition: (#>10, #<<less
SYNOPSIS
use Getopt::ExPar;
my(@PDT, @MM, %OPT);
ExPar @PDT, @MM, $OPT;
EXPORT
use Getopt::ExPar exports the sub ExPar into your name space.
ExPar is a perl5 module used to parse command line parameters. This package uses the @PDT, Parameter Description Table, and the @MM, Message Module, to return %OPT which is a hash reference containing the command line option data. The function of Getopt::ExPar is based on Getopt::EvaP, created by Stephen O. Lidie.
Introduction
The ExPar function parses a perl command line. Using the option definitions in the @PDT, argument types are checked and the arguments themselves may be checked against a specified range or pattern. By using both @PDT and @MM, several types of help may be retured to the user. ExPar handles command lines with this format:
command [-parameters] [file_list]
where any parameters and file_list are optional.
Parameter Description Table (PDT) Syntax
Here is the PDT syntax. Optional constructs are enclosed in [], and the | character separates possible values in a list.
PDT [program_name, alias]
[parameter_name[, alias]: type [pattern | range] [ = [default_variable,] default_value]]
PDTEND [flag_list]
flag_list is one or more of the following flags: optional_file_list | required_file_list | no_file_list: specifies condition of list of files at end of command line. (only one of these may be specified) abbreviations: allows for abbreviations of commands or aliases as long as enough of the command is given to make it distinguishable from all others. If not, a message is printed so the user may be more specific. switchglomming: allows for multiple single-letter switch options to be specified as single option (must be first option). pdt_warnings: for debugging a @PDT, it prints out messages that are not necessarily errors, like inconsistent number of default values in a list, etc.
The default_variable is an environment variable - see the section Usage Notes for complete details.
So, the simplest possible PDT would be:
PDT
PDTEND
This PDT would simply define a -help switch for the command, but is rather useless.
A typical PDT would look more like this:
PDT frog
number, n: integer = 1
chars, c: string = "default_string"
PDTEND no_file_list
This PDT, for command frog, defines two parameters, number (or n), of type integer with a default value of 1, and chars (or c), of type string with a default value of "default_string". The PDTEND no_file_list indicator indicates that no trailing file_list can appear on the command line. Of course, the -help switch is defined automatically.
Each of these options may be further refined by using a range and a pattern, respectively:
PDT frog
number, n: integer (((#100, the # is implied. Other simple conditions are < and == (a single = is accepted as ==, not an assignment). Ex: This condition: (#>10, #<<less
Download (0.018MB)
Added: 2007-08-07 License: Perl Artistic License Price:
808 downloads
Getopt::OO 0.07
Getopt::OO is an object oriented command line parser. more>>
Getopt::OO is an object oriented command line parser. It handles short, long and multi (--x ... -) value options. Getopt::OO module also incorporates help for options to simplify generation of usage statements.
SYNOPSIS
use Getopt::OO qw(Debug Verbose);
my ($handle) = Getopt::OO->new(@ARGV,
-d => {
help => turn on debug output,
callback => sub {Debug(1); 0},
},
-o => {
help => another option.,
},
-f => {
help => option that expects one more value.,
n_values => 1,
},
--long {
help => long option
},
--multiple_ => {
help => [
"Everything between --multiple_values and - is",
"an value for this options",
],
multi_value => 1,
multiple= => 1, # Can happen more than once on command line.
},
other_values => {
help => file_1 ... file_n,
multi_value => 1,
},
);
if ($handle->Values()) {
Debug("You will get output if -d was on command line");
if (my $f = handle->Values(-f)) {
print "Got $f with the -f value.n";
}
}
else {
print "No options found on command line.n";
}
Getopt::OO is an object oriented tool for parsing command line arguments. It expects a reference to the input arguments and uses a perl hash to describe how the command line arguments should be parsed. Note that by parsed, we mean what options expect values, etc. We check to make sure values exist on the command line as necessary -- nothing else. The caller is responsible for making sure that a value that he knows should be a file exists, is writable, or whatever.
Command line arguments can be broken into two distinct types: options and values that are associated with these options. In windows, options often start with a / but sometimes with a -, but in unix they almost universally start with a -. For this module options start with a -. We support two types of options: the short single dashed options and the long double dashed options.
The difference between these two is that with this module the short options can be combined into a single option, but the long options can not. For example, most of us will be familiar with the tar -xvf file command which can also be expressed as -x -v -f file. Long options can not be combined this way, so --help for example must always stand by itself.
The input template expects the option names as its keys. For instance if you were expecting -xv --hello as possible command line options, the keys for your template hash would be -x, -v, and --hello.
<<lessSYNOPSIS
use Getopt::OO qw(Debug Verbose);
my ($handle) = Getopt::OO->new(@ARGV,
-d => {
help => turn on debug output,
callback => sub {Debug(1); 0},
},
-o => {
help => another option.,
},
-f => {
help => option that expects one more value.,
n_values => 1,
},
--long {
help => long option
},
--multiple_ => {
help => [
"Everything between --multiple_values and - is",
"an value for this options",
],
multi_value => 1,
multiple= => 1, # Can happen more than once on command line.
},
other_values => {
help => file_1 ... file_n,
multi_value => 1,
},
);
if ($handle->Values()) {
Debug("You will get output if -d was on command line");
if (my $f = handle->Values(-f)) {
print "Got $f with the -f value.n";
}
}
else {
print "No options found on command line.n";
}
Getopt::OO is an object oriented tool for parsing command line arguments. It expects a reference to the input arguments and uses a perl hash to describe how the command line arguments should be parsed. Note that by parsed, we mean what options expect values, etc. We check to make sure values exist on the command line as necessary -- nothing else. The caller is responsible for making sure that a value that he knows should be a file exists, is writable, or whatever.
Command line arguments can be broken into two distinct types: options and values that are associated with these options. In windows, options often start with a / but sometimes with a -, but in unix they almost universally start with a -. For this module options start with a -. We support two types of options: the short single dashed options and the long double dashed options.
The difference between these two is that with this module the short options can be combined into a single option, but the long options can not. For example, most of us will be familiar with the tar -xvf file command which can also be expressed as -x -v -f file. Long options can not be combined this way, so --help for example must always stand by itself.
The input template expects the option names as its keys. For instance if you were expecting -xv --hello as possible command line options, the keys for your template hash would be -x, -v, and --hello.
Download (0.019MB)
Added: 2006-10-28 License: Perl Artistic License Price:
1091 downloads
Getopt::Clade 0.0.1
Getopt::Clade is a Perl module with command-Line Argument Declaration Engine. more>>
Getopt::Clade is a Perl module with command-Line Argument Declaration Engine.
This module is a placeholder for the real Getopt::Clade module. The module was supposed to be released by July 2005, to support the book "Perl Best Practices". Unfortunately, due to a series of family medical crises, the release of the module has been delayed, probably to early September 2005.
I sincerely apologize for any inconvenience this delay may cause. If you are looking for an alternative Getopt:: module, you may like to consider Getopt::Declare or Getopt::Euclid.
<<lessThis module is a placeholder for the real Getopt::Clade module. The module was supposed to be released by July 2005, to support the book "Perl Best Practices". Unfortunately, due to a series of family medical crises, the release of the module has been delayed, probably to early September 2005.
I sincerely apologize for any inconvenience this delay may cause. If you are looking for an alternative Getopt:: module, you may like to consider Getopt::Declare or Getopt::Euclid.
Download (0.003MB)
Added: 2007-01-13 License: Perl Artistic License Price:
1014 downloads
Getopt::Tabular 0.3
Getopt::Tabular is a Perl module for table-driven argument parsing for Perl 5. more>>
Getopt::Tabular is a Perl module for table-driven argument parsing for Perl 5.
SYNOPSIS
use Getopt::Tabular;
(or)
use Getopt::Tabular qw/GetOptions
SetHelp SetHelpOption
SetError GetError/;
...
≥topt::Tabular::SetHelp (long_help, usage_string);
@opt_table = (
[section_description, "section"],
[option, type, num_values, option_data, help_string],
...
);
≥tOptions (@opt_table, @ARGV [, @newARGV]) || exit 1;
Getopt::Tabular is a Perl 5 module for table-driven argument parsing, vaguely inspired by John Ousterhouts Tk_ParseArgv. All you really need to do to use the package is set up a table describing all your command-line options, and call ≥tOptions with three arguments: a reference to your option table, a reference to @ARGV (or something like it), and an optional third array reference (say, to @newARGV). ≥tOptions will process all arguments in @ARGV, and copy any leftover arguments (i.e. those that are not options or arguments to some option) to the @newARGV array. (If the @newARGV argument is not supplied, GetOptions will replace @ARGV with the stripped-down argument list.) If there are any invalid options, GetOptions will print an error message and return 0.
<<lessSYNOPSIS
use Getopt::Tabular;
(or)
use Getopt::Tabular qw/GetOptions
SetHelp SetHelpOption
SetError GetError/;
...
≥topt::Tabular::SetHelp (long_help, usage_string);
@opt_table = (
[section_description, "section"],
[option, type, num_values, option_data, help_string],
...
);
≥tOptions (@opt_table, @ARGV [, @newARGV]) || exit 1;
Getopt::Tabular is a Perl 5 module for table-driven argument parsing, vaguely inspired by John Ousterhouts Tk_ParseArgv. All you really need to do to use the package is set up a table describing all your command-line options, and call ≥tOptions with three arguments: a reference to your option table, a reference to @ARGV (or something like it), and an optional third array reference (say, to @newARGV). ≥tOptions will process all arguments in @ARGV, and copy any leftover arguments (i.e. those that are not options or arguments to some option) to the @newARGV array. (If the @newARGV argument is not supplied, GetOptions will replace @ARGV with the stripped-down argument list.) If there are any invalid options, GetOptions will print an error message and return 0.
Download (0.025MB)
Added: 2006-09-29 License: Perl Artistic License Price:
1120 downloads
Getopt::Euclid 0.1.0
Getopt::Euclid is Perl module executable uniform command-Line interface descriptions. more>>
Getopt::Euclid is Perl module executable uniform command-Line interface descriptions.
SYNOPSIS
use Getopt::Euclid;
if ($ARGV{-i}) {
print "Interactive mode...n";
}
for my $x (0..$ARGV{-size}{h}-1) {
for my $y (0..$ARGV{-size}{w}-1) {
do_something_with($x, $y);
}
}
__END__
=head1 NAME
yourprog - Your program here
=head1 VERSION
This documentation refers to yourprog version 1.9.4
=head1 USAGE
yourprog [options] -s[ize]=< h >x< w > -o[ut][file] < file >
=head1 REQUIRED ARGUMENTS
=over
=item -s[ize]=< h >x< w >
Specify size of simulation
=for Euclid:
h.type: int > 0
h.default: 24
w.type: int >= 10
w.default: 80
=item -o[ut][file] < file >
Specify output file
=for Euclid:
file.type: writable
file.default: -
=back
=head1 OPTIONS
=over
=item -i
Specify interactive simulation
=item -l[[en][gth]] < l >
Length of simulation [default: 99]
=for Euclid:
l.type: int > 0
l.default: 99
=item --version
=item --usage
=item --help
=item --man
Print the usual program information
=back
Remainder of documentation starts here...
=head1 AUTHOR
Damian Conway (DCONWAY@CPAN.org)
=head1 BUGS
There are undoubtedly serious bugs lurking somewhere in this code. Bug reports and other feedback are most welcome.
<<lessSYNOPSIS
use Getopt::Euclid;
if ($ARGV{-i}) {
print "Interactive mode...n";
}
for my $x (0..$ARGV{-size}{h}-1) {
for my $y (0..$ARGV{-size}{w}-1) {
do_something_with($x, $y);
}
}
__END__
=head1 NAME
yourprog - Your program here
=head1 VERSION
This documentation refers to yourprog version 1.9.4
=head1 USAGE
yourprog [options] -s[ize]=< h >x< w > -o[ut][file] < file >
=head1 REQUIRED ARGUMENTS
=over
=item -s[ize]=< h >x< w >
Specify size of simulation
=for Euclid:
h.type: int > 0
h.default: 24
w.type: int >= 10
w.default: 80
=item -o[ut][file] < file >
Specify output file
=for Euclid:
file.type: writable
file.default: -
=back
=head1 OPTIONS
=over
=item -i
Specify interactive simulation
=item -l[[en][gth]] < l >
Length of simulation [default: 99]
=for Euclid:
l.type: int > 0
l.default: 99
=item --version
=item --usage
=item --help
=item --man
Print the usual program information
=back
Remainder of documentation starts here...
=head1 AUTHOR
Damian Conway (DCONWAY@CPAN.org)
=head1 BUGS
There are undoubtedly serious bugs lurking somewhere in this code. Bug reports and other feedback are most welcome.
Download (0.024MB)
Added: 2007-01-13 License: Perl Artistic License Price:
1014 downloads
imsptool 0.98
Imsptool is a command line tool to communicate with an IMSP server. more>>
Imsptool is a command line tool to communicate with an IMSP server. It allows you to create, delete, import, and export address books.
imsptool imports and exports using the LDIF format. Netscape Messenger and LDAP directory servers such as OpenLDAP use this file format directly.
IMSP is an internet protocol designed to complement IMAP. It stores additional mail user agent configuration information, including address books. IMSP is supported by very few mailers (Simeon by Esys Corp. and Mulberry are two I know of) and is considered obsolete. The ACAP protocol was designed to replace IMSP, but caught on yet.
X.500/LDAP is becoming the standard way to store large e-mail directories.
imsptool was developed to provide an easy way to use IMSP address books in Netscape Messenger. Additionally, it can be used to migrate IMSP address books to LDAP directories.
imsptool has been compiled and tested on Linux 2.2 and Solaris 2.7. It has been tested and works with the Cyrus IMSP server version 1.5a6.
Enhancements:
- imsptool.c: fixed buggy read_literal again, implemented mailing lists on import addressbook, implemented rename command
<<lessimsptool imports and exports using the LDIF format. Netscape Messenger and LDAP directory servers such as OpenLDAP use this file format directly.
IMSP is an internet protocol designed to complement IMAP. It stores additional mail user agent configuration information, including address books. IMSP is supported by very few mailers (Simeon by Esys Corp. and Mulberry are two I know of) and is considered obsolete. The ACAP protocol was designed to replace IMSP, but caught on yet.
X.500/LDAP is becoming the standard way to store large e-mail directories.
imsptool was developed to provide an easy way to use IMSP address books in Netscape Messenger. Additionally, it can be used to migrate IMSP address books to LDAP directories.
imsptool has been compiled and tested on Linux 2.2 and Solaris 2.7. It has been tested and works with the Cyrus IMSP server version 1.5a6.
Enhancements:
- imsptool.c: fixed buggy read_literal again, implemented mailing lists on import addressbook, implemented rename command
Download (0.019MB)
Added: 2006-07-01 License: GPL (GNU General Public License) Price:
1211 downloads
Openglad 0.98
Openglad is a SDL port of the old (and recently open-sourced) DOS game Gladiator. more>>
Openglad project is a SDL port of the old (and recently open-sourced) DOS game Gladiator.
Openglad is an SDL port of an old DOS game called Gladiator, which was developed by FSGames in the mid 90s. It is a top-down gauntlet-style RPG in which you hire team mates, go on missions, and improve your team with the spoils you reap. It can be played by up to 4 players (using split-screen), and features many classes, special abilities, and a scenario editor.
<<lessOpenglad is an SDL port of an old DOS game called Gladiator, which was developed by FSGames in the mid 90s. It is a top-down gauntlet-style RPG in which you hire team mates, go on missions, and improve your team with the spoils you reap. It can be played by up to 4 players (using split-screen), and features many classes, special abilities, and a scenario editor.
Download (0.67MB)
Added: 2007-01-04 License: GPL (GNU General Public License) Price:
1031 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above getopt plus 0.98 search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed