Vulcan::OptConf - Get command line options.
use Vulcan::OptConf; $Vulcan::OptConf::ARGC = -1; @Vulcan::OptConf::CONF = qw( pass_through ); my $option = Vulcan::OptConf->load( '/conf/file' ); my %foo = $option->dump( 'foo' ); my %opt = $option->set( bar => 'baz' )->get( 'timeout=i', 'verbose' )->dump;
Load options from a YAML file $conf, which when unspecified, defaults to $RealBin/.config, or $RealBin/../.config, if either exists. Returns object.
Dump options by $name, or that of $0 if $name is unspecified. Returns HASH in scalar context or flattened HASH in list context.
Set options specified by %opt for $0. Returns object.
Invoke Getopt::Long to get @options, 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.
print help and exit, when any of @option is not defined.
Replace $ROOT in $path if defined.