Changeset 1454


Ignore:
Timestamp:
Apr 6, 2012, 11:08:09 AM (7 years ago)
Author:
ebaudrez
Message:

minor tweaks to command-line option processing

$debug is now an incrementable number. Removed the abbreviation '-old'
for '-oldroot', as Getopt::Long automatically automatically recognizes
such abbreviations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • projects/md2mb/devel/md2mb/bin/md2mb.pl

    r1453 r1454  
    3434# parse command-line options
    3535GetOptions(
    36     'cmd|c'           => \$cmd,
    37     'debug|d'         => \$debug,
    38     'file|f'          => \$file,
    39     'help|h'          => \$help,
    40     'man|m'           => \$man,
    41     'oldroot|old|o=s' => \$oldroot,
    42     'profile|p=s'     => \$profile,
    43     'subdir|s=s'      => \$subdir,
    44     'touch|t'         => \$touch,
     36    'cmd|c'       => \$cmd,
     37    'debug|d+'    => \$debug,
     38    'file|f'      => \$file,
     39    'help|h'      => \$help,
     40    'man|m'       => \$man,
     41    'oldroot|o=s' => \$oldroot,
     42    'profile|p=s' => \$profile,
     43    'subdir|s=s'  => \$subdir,
     44    'touch|t'     => \$touch,
    4545) or pod2usage(2);
    4646pod2usage(1) if ($help);
     
    5656DEBUG MODE, not doing anything, just printing
    5757--- current state ---
     58debug   = $debug
    5859cmd     = $cmd
    5960oldroot = $oldroot
     
    203204
    204205 Options:
    205    -cmd     | -c                command to process mail
    206    -debug   | -d        debug mode
    207    -file    | -f                whether $newroot is a file or a directory
    208    -help    | -h        brief help message
    209    -man     | -m        full documentation
    210    -oldroot | -old | -o     location of the KMail mailboxes
    211    -profile | -p        path to the Thunderbird profile to install to
    212    -subdir  | -s        subdir that will be created to hold the
    213                 imported mails
    214    -touch   | -t        create empty files corresponding to .sdb dirs
     206   -cmd     | -c    command to process mail
     207   -debug   | -d    debug mode
     208   -file    | -f    whether $newroot is a file or a directory
     209   -help    | -h    brief help message
     210   -man     | -m    full documentation
     211   -oldroot | -o    location of the KMail mailboxes
     212   -profile | -p    path to the Thunderbird profile to install to
     213   -subdir  | -s    subdir that will be created to hold the
     214            imported mails
     215   -touch   | -t    create empty files corresponding to .sdb dirs
    215216
    216217=head1 OPTIONS
Note: See TracChangeset for help on using the changeset viewer.