File Coverage

lib/Bio/BPWrapper.pm
Criterion Covered Total %
statement 17 20 85.0
branch 2 4 50.0
condition n/a
subroutine 6 7 85.7
pod 0 2 0.0
total 25 33 75.7


line stmt bran cond sub pod time code
1             #!/usr/bin/env perl
2             # Copyright (c) 2016 by Weigang Qiu Lab
3              
4             package Bio::BPWrapper;
5              
6 63     63   468 use strict;
  63         141  
  63         2745  
7 63     63   320 use warnings;
  63         104  
  63         3811  
8 63     63   1126 use 5.010;
  63         257  
9             our $VERSION = '1.15';
10              
11 63     63   373 use constant PROGRAM => 'Bio::BPWrapper';
  63         133  
  63         9064  
12              
13             =pod
14              
15             =head2 Common Subroutines
16              
17             =head3 print_version $program_name
18              
19             Show program name and version and exit
20              
21             =cut
22              
23              
24             sub print_version($)
25             {
26 0     0 0 0 my $program = shift;
27 0         0 say "${program}, version $Bio::BPWrapper::VERSION";
28 0         0 exit;
29             }
30              
31 63     63   456 use Pod::Usage;
  63         278  
  63         14697  
32              
33             =head3 common_opts $opts
34              
35             Handle some common options:
36              
37             =over 4
38              
39             =item C<--help>, C<-h>
40              
41             Show usage help
42              
43             =item C<--man>
44              
45             Show a manual page via L
46              
47             =back
48              
49             =cut
50              
51             sub common_opts($)
52             {
53 63     63 0 139 my $opts = shift;
54 63 50       257 pod2usage(1) if $opts->{"help"};
55 63 50       297 pod2usage(-exitstatus => 0, -verbose => 2) if $opts->{"man"};
56             }
57              
58              
59             unless (caller) {
60             print "Pssst... this is a module. Invoke via bioaln, bioseq, biopop, or biotree.\n";
61             }
62             1;