diff options
Diffstat (limited to 'pdftool.pl')
-rwxr-xr-x | pdftool.pl | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1,7 +1,8 @@ #! /usr/bin/perl -w -use Getopt::Long qw(:config posix_default no_ignore_case bundling); +use Getopt::Long qw(:config posix_default no_ignore_case gnu_compat + bundling auto_version auto_help); use Pod::Usage; use IPC::Open2; use POSIX qw(floor); @@ -46,6 +47,10 @@ option suppresses this. Display a brief help. +=item B<--version> + +Display the version number of the I<PDFTool> program. + =item B<--man> Display the manual page. @@ -83,9 +88,7 @@ my $book; my $nup = 1; my $quiet; my $man; -my $help; -# TODO: select pages # TODO: choose the output type GetOptions( "select|s=s" => \$select, "paper|p=s" => \$paper, @@ -103,11 +106,10 @@ GetOptions( "select|s=s" => \$select, "8" => sub { $nup = 8 }, "9" => sub { $nup = 9 }, "q|quiet" => \$quiet, - "help" => \$help, "man" => \$man ) or pod2usage(2); -pod2usage(1) if (defined $help or $#ARGV > 1); +pod2usage(2) if ($#ARGV > 1); pod2usage(-exitstatus => 0, -verbose => 2) if defined $man; # Input and output files |