equal
deleted
inserted
replaced
1 #! /usr/bin/perl |
1 #! /usr/bin/perl |
2 |
2 |
3 use 5.010; |
3 use 5.010; |
4 use strict; |
4 use strict; |
5 use warnings; |
5 use warnings; |
6 use Pod::Usage; |
|
7 use Getopt::Long; |
6 use Getopt::Long; |
8 use Template; |
7 use Template; |
9 #use autodie; |
8 use Pod::Usage; |
10 |
9 |
11 my $DIR = "requests"; |
10 my $DIR = "requests"; |
12 |
11 |
13 my $opt_template = "request.cnf"; |
12 my $opt_template = "request.cnf"; |
14 my $opt_check; |
13 my $opt_check; |
20 GetOptions( |
19 GetOptions( |
21 "template=s" => \$opt_template, |
20 "template=s" => \$opt_template, |
22 "init" => \$opt_init, |
21 "init" => \$opt_init, |
23 "check" => \$opt_check, |
22 "check" => \$opt_check, |
24 "h|help" => sub { pod2usage(-exit => 0, -verbose => 1) }, |
23 "h|help" => sub { pod2usage(-exit => 0, -verbose => 1) }, |
25 "m|man" => sub { pod2usage(-exit => 0, -verbose => 2, |
24 "m|man" => sub { pod2usage(-verbose => 2, -exit => 0, |
26 -noperldoc => system("perldoc -V >/dev/null 2>&1")) } |
25 -noperldoc => system("perldoc -V 1>/dev/null 2>&1")) } |
27 ) or pod2usage; |
26 ) or pod2usage; |
28 |
27 |
29 my $CN = shift; |
28 my $CN = shift; |
30 mkdir($DIR), exit if $opt_init; |
29 mkdir($DIR), exit if $opt_init; |
31 |
30 |
89 =item B<--template> I<file> |
88 =item B<--template> I<file> |
90 |
89 |
91 The template file to be used for creating the request. The templates will be searched |
90 The template file to be used for creating the request. The templates will be searched |
92 unter F<ca/templates>. The only substituted item is [%CN%]. (default: request.cnf) |
91 unter F<ca/templates>. The only substituted item is [%CN%]. (default: request.cnf) |
93 |
92 |
|
93 =back |
|
94 |
94 =cut |
95 =cut |
95 |
96 |
96 # vim:sts=4 ts=4 sw=4 aw ai sm: |
97 # vim:sts=4 ts=4 sw=4 aw ai sm: |