#!/usr/local/bin/perl
#
# showconf.pl v1.1  (C) 1999 heddy Boubaker
#
# ChangeLog
#  25-Feb-1999: Birthday
#
# Read configuration and print all variables
#
# Usage: showconf.pl [options]
#        -h       help
#        -c conf  config name
#        -v       verbose

use strict;
use vars qw($opt_c $opt_v $opt_h);

use HtDig;
require 'getopts.pl';

### main ###

&Getopts ('c:h:v:');
if ($opt_h ne "") {
    print <<EndOfHelp

List HtDig Configuration variables

Usage: $0 [options]
  -h         help
  -c config  configname
  -v         verbose

EndOfHelp
;
    exit 0;
}

my $htdig  = new HtDig ( 'Config'=>$opt_c, 'Verbose'=>$opt_v ) || die "new HtDig($opt_c, $opt_v) Failure $!";
my $htconf = $htdig->config || die "htdig->config() Failure $!";

foreach my $k (sort $htconf->keys ) {
    printf( "%-25s:\t%s\n", $k, $htconf->{$k} );
}

exit 0;

### showconf.pl.pl ens here ###
