Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Getopt::Mixed::Help 0.26

    Download button

    No screenshots available
    Downloads: 378  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Thomas Dorner | More programs
    Perl Artistic License / FREE
    May 5th, 2012, 13:39 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Getopt::Mixed::Help description

    A Perl module can combine Getopt::Mixed with usage and help.

    Getopt::Mixed::Help Perl module can combine Getopt::Mixed with usage and help.

    SYNOPSIS

    use Getopt::Mixed::Help
    ('< filenames >...' => 'filenames to be processed',
    'ENV' => 'SCRIPT_OPT_',
    'ENV_' => 'SCRIPT_OPT_',
    'd>debug:i number' => 'turn on debugging information (*)',
    'e>execute' => 'do it without asking for confirmation',
    'f>force' => 'override all safety checks',
    'i>interactive' => 'asks for confirmation before doing it',
    'n>no-execute' => 'just print what would be done without doing it',
    'q>quiet' => 'suppress all information',
    's>summary' => 'print summary information on exit',
    'v>verbose:i number' => 'turn on verbose information (*)',
    '(*)' => '(*) You may add a positive integer for a higher level.'
    );
    if ($opt_...

    export SCRIPT_OPT_INTERACTIVE=1
    test_script -d -v 2 --summary some_file.ext other_file.ext


    ABSTRACT

    Getopt::Mixed::Help is a simplified interface to Getopt::Mixed adding usage (help) functionality. It automatically adds the options -?, -h and --help (the last two configurable) to print the usage text. It allows to get option values from the environment (if the operating system it runs on supports environment variables). It can also add different flavours of support for multiple options. Finally it supports debugging output of the options used.

    The module uses a direct import mechanism called with a hash as parameter. The structure of the hash is as follows:

    The key is a combined (SHORT > LONG [ARGUMENT SPECIFIER [VALUE IDENTIFIER]]) option description for Getopt::Mixed, except for the VALUE IDENTIFIER which is simply included into the help text. The value following the key is simply the help text for this option.

    If the second character of the first key is not >, the first key is taken as descriptive identifiers for additional parameters and the help for them.
    Any key starting with ( and ending with ) will be interpreted as a footnote (additional help text) to the real options. They should be used at the end of the list only.

    A key equal to ENV is used to get default values for the remaining options from the environment. For any option not initialised on the command line an environment variable with the prefix of the value following ENV and a rest of the name identical to the uppercase long option name (e.g. SCRIPT_OPT_DEBUG) will be checked. If this environment variable exists, it will be used to set the option. Note that in the name of the rest of the environment variable uppercase is used and hyphens are relaced with underlines.

    A key equal to ENV_ is used in the same way as the key ENV. In addition it allows for a special environment variable with the prefix of the value following ENV followed by a single underline (_) as combined initialiser (for more than one option, e.g. export SCRIPT_OPT__='debug verbose=2'). Note that no whitespaces are allowed in the values of the options initialised this way as the string in the environment variable is parsed in a simple way.

    The module defines the variable $optUsage containing the complete help text.
    If an option debug exists and is choosen on the command line, this module will print all option values and all remaining parameters to standard error. The name of this option may be changed, see "changing the debug option" below in the "CHANGING DEFAULT BEHAVIOUR" section.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    Getopt::Mixed usage | Getopt::Mixed tutorial | perl module | module | help | usage

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM