NAME

Vulcan::Gflags - Get command line options.

SYNOPSIS

use Vulcan::Gflags;

$Vulcan::Gflags::ARGC = -1;
@Vulcan::Gflags::CONF = qw( pass_through );

my $option = Vulcan::Gflags->load( '/conf/file' );
my %opt = $option->get( 'timeout=i', 'verbose' )->dump();

METHODS

load( $conf )

Load options from a gflags file $conf. Returns object.

dump()

Dump options. Returns HASH in scalar context or flattened HASH in list context.

get( @option )

Invoke Getopt::Long to get @option, if any specified. Returns object.

Getopt::Long is configured through @CONF.

The leftover @ARGV size is asserted through $ARGC. @ARGV cannot be empty if $ARGC is negative, otherwise size of @ARGV needs to equal $ARGC.

assert( @option )

print help and exit, if any of @option is not defined.