App::Cmdline::Options::ExtDB

- NAME
- VERSION
- SYNOPSIS
- DESCRIPTION
- OPTIONS
  - --dbshow
- AUTHOR
- COPYRIGHT AND LICENSE

# NAME

App::Cmdline::Options::ExtDB - extended set of database-related options for command-line applications

# VERSION

version 0.1.2

# SYNOPSIS

       # In your module that represents a command-line application:
       sub opt_spec {
           my $self = shift;
           return $self->check_for_duplicates (
               [ 'check|c' => "only check the configuration"  ],
               ...,
               $self->composed_of (
                   'App::Cmdline::Options::ExtDB',  # here are the database options added
                   'App::Cmdline::Options::Basic',  # here may be other options
               )
           );
        }

# DESCRIPTION

This is a kind of a role module, defining a particular set of command-line options and their validation. See more about how to write a module that represents a command-line application and that uses this set of options in App::Cmdline.

# OPTIONS

Particularly, this module extends the basic database-related options, adding an option for showing how the database options have been set. It inherits from App::Cmdline::Options::DB module, and, therefore, provides the same options defined there, and it adds the following option:

        [ 'dbshow' => "show database access properties"  ],

## --dbshow

It prints (on STDOUT) values given to the database-related options. For example:

       senger@ShereKhan2:myapp --dbshow --dbname Emma --dbpasswd vrrr -dbhost 12.13.14.15
       DBNAME: Emma
       DBHOST: 12.13.14.15
       DBPORT: 3306
       DBUSER: reader
       DBPASS: ...given but not shown
       DBSOCK: n/a

# AUTHOR

Martin Senger <martin.senger@gmail.com>

# COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Martin Senger, CBRC - KAUST (Computational Biology Research Center - King Abdullah University of Science and Technology) All Rights Reserved.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.