You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bulk-processor/LoadCLIConfig.pm

32 lines
720 B

package LoadCLIConfig;
use strict;
## no critic
use Getopt::Long;
use Globals qw($defaultconfig);
use LoadConfig qw(load_config);
my $configfile;
my $arg = shift @ARGV;
if (defined $arg) {
$configfile = $arg;
} else {
$configfile = $defaultconfig;
}
my $configfile = $defaultconfig;
GetOptions ("host=s" => \$host,
"port=i" => \$port,
"file=s" => \$output_filename,
"dir=s" => \$output_dir,
"user=s" => \$user,
"pass=s" => \$pass,
"period=s" => \$period,
'verbose+' => \$verbose) or fatal("Error in command line arguments");
load_config($configfile);
1;