line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Bio::Roary::CommandLine::Common; |
2
|
|
|
|
|
|
|
# ABSTRACT: Common command line settings |
3
|
|
|
|
|
|
|
$Bio::Roary::CommandLine::Common::VERSION = '3.10.2'; |
4
|
|
|
|
|
|
|
|
5
|
9
|
|
|
9
|
|
4737
|
use Moose; |
|
9
|
|
|
|
|
20
|
|
|
9
|
|
|
|
|
63
|
|
6
|
9
|
|
|
9
|
|
60188
|
use FindBin; |
|
9
|
|
|
|
|
8516
|
|
|
9
|
|
|
|
|
402
|
|
7
|
9
|
|
|
9
|
|
1976
|
use Log::Log4perl qw(:easy); |
|
9
|
|
|
|
|
100985
|
|
|
9
|
|
|
|
|
77
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
has 'logger' => ( is => 'ro', lazy => 1, builder => '_build_logger'); |
10
|
|
|
|
|
|
|
has 'version' => ( is => 'rw', isa => 'Bool', default => 0 ); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub _build_logger |
13
|
|
|
|
|
|
|
{ |
14
|
5
|
|
|
5
|
|
17
|
my ($self) = @_; |
15
|
5
|
|
|
|
|
89
|
Log::Log4perl->easy_init($ERROR); |
16
|
5
|
|
|
|
|
27839
|
my $logger = get_logger(); |
17
|
5
|
|
|
|
|
692
|
return $logger; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub run { |
22
|
|
|
|
|
|
|
my ($self) = @_; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub usage_text { |
26
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
27
|
0
|
|
|
|
|
|
return "Usage text"; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub _version { |
31
|
0
|
|
|
0
|
|
|
my ($self) = @_; |
32
|
0
|
|
|
|
|
|
return "x.y.z\n"; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
# add our included binaries to the END of the PATH |
37
|
|
|
|
|
|
|
before 'run' => sub { |
38
|
|
|
|
|
|
|
my ($self) = @_; |
39
|
|
|
|
|
|
|
my $OPSYS = $^O; |
40
|
|
|
|
|
|
|
my $BINDIR = "$FindBin::RealBin/../binaries/$OPSYS"; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
for my $dir ($BINDIR, $FindBin::RealBin) { |
43
|
|
|
|
|
|
|
if (-d $dir) { |
44
|
|
|
|
|
|
|
$ENV{PATH} .= ":$dir"; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
}; |
48
|
|
|
|
|
|
|
|
49
|
9
|
|
|
9
|
|
9311
|
no Moose; |
|
9
|
|
|
|
|
35
|
|
|
9
|
|
|
|
|
74
|
|
50
|
|
|
|
|
|
|
1; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
__END__ |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=pod |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=encoding UTF-8 |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 NAME |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Bio::Roary::CommandLine::Common - Common command line settings |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 VERSION |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
version 3.10.2 |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 SYNOPSIS |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Common command line settings |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
extends 'Bio::Roary::CommandLine::Common'; |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 AUTHOR |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Andrew J. Page <ap13@sanger.ac.uk> |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
This software is Copyright (c) 2013 by Wellcome Trust Sanger Institute. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
This is free software, licensed under: |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
The GNU General Public License, Version 3, June 2007 |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=cut |