Changeset 1445


Ignore:
Timestamp:
Apr 4, 2012, 5:14:47 PM (6 years ago)
Author:
ebaudrez
Message:

started using POD documentation

File:
1 edited

Legend:

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

    r1412 r1445  
    11#!/usr/bin/perl -w
    2 #
    3 # Program to import a maildir kmail environement into a thunderbird one.
    4 #
    5 # Released under the GPLv2 or the Artistic license at your will.
     2
     3=head1 NAME
     4
     5md2mb.pl - Import a maildir kmail environment into a thunderbird one
     6
     7=cut
    68
    79use strict;
     
    1113use File::Path;
    1214use File::Glob ':glob';
     15use Getopt::Long;
     16use Pod::Usage;
    1317
     18# settings
    1419my $cmd="formail";
    1520# CHANGE AS YOU WISH
     
    2025my $debug = 0;
    2126# END CHANGE
     27my $help = 0;
     28my $man = 0;
    2229
    23 $debug++ if ((defined $ARGV[0]) && ($ARGV[0] eq "-v"));
     30# parse command-line options
     31GetOptions(
     32    'help|h'    => \$help,
     33    'man|m'     => \$man,
     34    'verbose|v' => sub { $debug++ },
     35) or pod2usage(2);
     36pod2usage(1) if ($help);
     37pod2usage(-exitstatus => 0, -verbose => 2) if ($man);
     38
    2439print "DEBUG MODE, not doing anything, just printing\n" if ($debug);
    2540if ($debug) {
     
    112127}
    113128}
     129__END__
     130
     131=head1 SYNOPSIS
     132
     133md2mb.pl  [options]
     134
     135 Options:
     136   -help        brief help message
     137   -man         full documentation
     138
     139=head1 OPTIONS
     140
     141=over 4
     142
     143=item B<-help>
     144
     145Print a brief help message and exits.
     146
     147=item B<-man>
     148
     149Prints the manual page and exits.
     150
     151=back
     152
     153=head1 DESCRIPTION
     154
     155B<md2mb.pl> will import a B<kmail> maildir environment, and transform it into a
     156B<thunderbird> one.
     157
     158=head1 AUTHOR
     159
     160Bruno Cornec, http://brunocornec.wordpress.com
     161
     162=head1 LICENSE
     163
     164Released under the GPLv2 or the Artistic license at your will.
     165
     166=cut
Note: See TracChangeset for help on using the changeset viewer.