#!/usr/bin/env perl # read_conf.pl - Outputs lutim's config value for given keypath use strict; use warnings; use FindBin; use Cwd qw(realpath); use Config::FromHash; sub print_help { print <new(filename => $filename); my $value = $config->get($ARGV[0]); if (defined $value) { print $value; exit 0; } if (not defined $value and defined $ARGV[1]) { print $ARGV[1]; exit 0; } print STDERR "Error: keypath \"$ARGV[0]\" not found in config, and no default value provided.\n"; exit 1;