3 push(@INC,'/home/gecko/debian/debvote');
5 use Debbugs::Config qw(%Globals &ParseConfigFile);
6 #use Debvote::Email qw(&InitEmailTags &LoadEmail &ProcessTags %gtags);
10 #############################################################################
11 # Customization Variables
12 #############################################################################
14 #############################################################################
15 # Gloabal Variable Declaration
16 #############################################################################
17 my $VERSION = '3.01'; #External Version number
18 my $BANNER = "DebBugs v$VERSION"; #Version Banner - text form
19 my $FILE = 'debbugs-dump'; #File name
23 #############################################################################
25 #############################################################################
26 # Hash used to process commandline options
30 my %opthash = (# ------------------ actions
31 "config|c=s" => \$config,
33 "version|V" => \&banner,
34 "verbose|v!" => \$verbose,
35 "quiet|q!" => \$quiet,
36 "debug|d+" => \$debug, # Count the -d flags
38 Getopt::Long::config('bundling', 'no_getopt_compat', 'no_auto_abbrev');
39 GetOptions(%opthash) or &syntax( 1 );
41 { print "D2: Commandline:\n";
42 print "\tconfig = $config\n" unless $config eq '';
43 print "\tverbos\n" if $verbose;
44 print "\tquiet\n" if $quiet;
45 print "\tdebug = $debug\n";
47 $Globals{ 'debug' } = $debug;
48 $Globals{ 'quiet' } = $quiet;
49 $Globals{ 'verbose' } = $verbose;
51 #############################################################################
52 # Read Config File and parse
53 #############################################################################
54 $config = "./debbugs.cfg" if( $config eq '' );
55 print "D1: config file=$config\n" if $Globals{ 'debug' };
56 @config = ParseConfigFile( $config );
60 Debbugs::DBase::ReadRecord( "59999" );
61 foreach my $key ( keys( %Record ) )
63 print "Key= $key Value = ". $Record{ "$key" } . "\n";
65 Debbugs::DBase::ReadRecord( "60000" );
66 foreach my $key ( keys( %Record ) )
68 print "Key= $key Value = ". $Record{ "$key" } . "\n";
72 #############################################################################
74 #############################################################################
78 print <<"EOT-EOT-EOT";
79 Syntax: $FILE [options]
80 -c, --config CFGFILE read CFGFILE for configuration (default=./debvote.cfg)
81 -h, --help display this help text
82 -v, --verbose verbose messages
83 -q, --quiet cancels verbose in a config file
84 -V, --version display Debvote version and exit
85 -d, --debug turn debug messages ON (multiple -d for more verbose)