--- trunk/sender.pl 2005/08/22 20:24:04 72 +++ trunk/sender.pl 2005/08/22 20:39:38 73 @@ -4,12 +4,13 @@ use blib; use Nos 0.7; use Getopt::Long; +use Pod::Usage; =head1 NAME sender.pl - command line notify sender utility -=head1 SYNOPSYS +=head1 SYNOPSIS sender.pl --create=mylist sender.pl --drop=mylist @@ -18,12 +19,10 @@ sender.pl --list[=mylist] sender.pl --queue[=mylist message.txt] sender.pl --send=mylist + sender.pl --help + sender.pl --man -In C something like: - - mylist: "| cd /path/to && ./sender.pl --inbox=mylist" - -=head2 Command options +=head1 OPTIONS =over 20 @@ -48,7 +47,12 @@ "driver=s" => \$opt->{'email_send_driver'}, "sleep=i" => \$opt->{'sleep'}, "aliases=s" => \$opt->{'aliases'}, -); + "help" => \$opt->{'help'}, + "man" => \$opt->{'man'} +) || pod2usage(-verbose => 0); + +pod2usage(-verbose => 1) if ($opt->{'help'}); +pod2usage(-verbose => 2) if ($opt->{'man'}); my $nos = new Nos( dsn => 'dbi:Pg:dbname=notices', @@ -305,7 +309,7 @@ } else { - die "see perldoc $0 for help\n"; + pod2usage(-verbose=>0); } =back @@ -326,7 +330,10 @@ =back +=head1 DESCRIPTION +This command will use notice-sender C module directly to make modifications on lists +or with C<--inbox> option server as incomming mail filter. =head1 AUTHOR