--- svgtopdf.orig 2006-05-14 23:59:52.000000000 -0700 +++ svgtopdf 2006-05-15 00:10:57.000000000 -0700 @@ -2,11 +2,35 @@ use strict; use warnings; + +use Getopt::Long; +use Pod::Usage; use PDF::API2; use SVG2; use POSIX; our %ops; +use vars qw($VERSION); +$VERSION = sprintf("%d.%02d", q$Revision: 1.0 $ =~ /(\d+)\.(\d+)/); + +our $opt_help = 0; +our $opt_man = 0; +our $opt_version = 0; +Getopt::Long::Configure ("bundling", "no_ignore_case"); +GetOptions ( + "help|h", + "man", + "version|v", + ) or pod2usage(-verbose => 1, -exitstatus => 0); + +if ($opt_version) { + print "$VERSION\n"; + exit 0; +} + +pod2usage(-verbose => 2, -exitstatus => 0) if ($opt_man); +pod2usage(-verbose => 1, -exitstatus => 0) if ($opt_help); + my $filename = $ARGV[0]; my $data = join('', ); @@ -352,16 +376,36 @@ $a00 * $x3 + $a01 * $y3, $a10 * $x3 + $a11 * $y3); } +__END__ + =head1 NAME svgtopdf - Utility for converting SVG files into PDFs -=head2 SYNOPSIS +=head1 SYNOPSIS svgtopdf < SVGFILE =head1 DESCRIPTION +This script... + +=head1 OPTIONS + +=over 8 + +=item B<-V>, B<--version> + +Prints the version and exits + +=item B<-h>, B<--help> + +Prints a brief usage message with options summary. + +=item B<--man> + +Prints a manual page (detailed help). Same as `perldoc svgtopdf` or `man svgtopdf`. + =head1 AUTHOR Martin Owens ( DoctorMO[ate]gmail.com )