File Coverage

blib/lib/SGML/DTDParse.pm
Criterion Covered Total %
statement 0 8 0.0
branch 0 6 0.0
condition n/a
subroutine 0 3 0.0
pod 0 3 0.0
total 0 20 0.0


line stmt bran cond sub pod time code
1             #
2             # $Id: DTDParse.pm,v 2.2 2005/07/16 03:21:35 ehood Exp $
3              
4             package SGML::DTDParse;
5              
6             $VERSION = "2.00";
7 0     0 0   sub Version { $VERSION; }
8              
9             require 5.005;
10              
11             ## General utilities for programs
12              
13             @SGML::DTDParse::CommonOptions = (
14             'help',
15             'man',
16             'version',
17             );
18              
19             sub process_common_options {
20 0     0 0   my $opts = shift;
21 0 0         usage(-verbose => 0, -exitval => 0) if ($opts->{'version'});
22 0 0         usage(-verbose => 1, -exitval => 0) if ($opts->{'help'});
23 0 0         usage(-verbose => 2, -exitval => 0) if ($opts->{'man'});
24             }
25              
26             sub usage {
27 0     0 0   require Pod::Usage;
28 0           require FindBin;
29 0           Pod::Usage::pod2usage( {
30             -message => join('', 'Version: ', $FindBin::Script, ' v', $VERSION, "\n"),
31             @_
32             });
33             }
34              
35              
36             1;
37              
38             __END__