| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package XT::Manager::Command; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
980
|
use 5.008003; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
37
|
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
50
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
BEGIN { |
|
7
|
1
|
|
|
1
|
|
2
|
$XT::Manager::Command::AUTHORITY = 'cpan:TOBYINK'; |
|
8
|
1
|
|
|
|
|
27
|
$XT::Manager::Command::VERSION = '0.006'; |
|
9
|
|
|
|
|
|
|
} |
|
10
|
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
5
|
use base qw/App::Cmd::Command/; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
125
|
|
|
12
|
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
|
618
|
use XT::Manager::API; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
40
|
|
|
14
|
1
|
|
|
1
|
|
7
|
use Cwd; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
345
|
|
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub opt_spec |
|
17
|
|
|
|
|
|
|
{ |
|
18
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
|
19
|
|
|
|
|
|
|
return ( |
|
20
|
|
|
|
|
|
|
[ |
|
21
|
0
|
|
|
|
|
|
"repo|R=s", |
|
22
|
|
|
|
|
|
|
sprintf("custom xt repository path [default: %s]", $self->_default_repo), |
|
23
|
|
|
|
|
|
|
{ default => $self->_default_repo }, |
|
24
|
|
|
|
|
|
|
], |
|
25
|
|
|
|
|
|
|
[ |
|
26
|
|
|
|
|
|
|
"xtdir|X=s", |
|
27
|
|
|
|
|
|
|
sprintf("local xt directory [default: %s]", $self->_default_xtdir), |
|
28
|
|
|
|
|
|
|
{ default => $self->_default_xtdir }, |
|
29
|
|
|
|
|
|
|
], |
|
30
|
|
|
|
|
|
|
); |
|
31
|
|
|
|
|
|
|
} |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub _default_repo |
|
34
|
|
|
|
|
|
|
{ |
|
35
|
0
|
0
|
|
0
|
|
|
defined $ENV{PERL_XT_MANAGER_DIR} |
|
36
|
|
|
|
|
|
|
? $ENV{PERL_XT_MANAGER_DIR} |
|
37
|
|
|
|
|
|
|
: "$ENV{HOME}/perl5/xt"; |
|
38
|
|
|
|
|
|
|
} |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub _default_xtdir |
|
41
|
|
|
|
|
|
|
{ |
|
42
|
0
|
0
|
|
0
|
|
|
(cwd =~ m{[\\\/]xt$}) ? '.' : 'xt'; |
|
43
|
|
|
|
|
|
|
} |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub get_repository |
|
46
|
|
|
|
|
|
|
{ |
|
47
|
0
|
|
|
0
|
0
|
|
my ($self, $opts) = @_; |
|
48
|
0
|
0
|
|
|
|
|
return "XT::Manager::Repository"->new( |
|
49
|
|
|
|
|
|
|
dir => (defined $opts->{repo} ? $opts->{repo} : $self->_default_repo), |
|
50
|
|
|
|
|
|
|
); |
|
51
|
|
|
|
|
|
|
} |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub get_xtdir |
|
54
|
|
|
|
|
|
|
{ |
|
55
|
0
|
|
|
0
|
0
|
|
my ($self, $opts) = @_; |
|
56
|
0
|
0
|
|
|
|
|
return "XT::Manager::XTdir"->new( |
|
57
|
|
|
|
|
|
|
dir => (defined $opts->{xtdir} ? $opts->{xtdir} : $self->_default_xtdir), |
|
58
|
|
|
|
|
|
|
); |
|
59
|
|
|
|
|
|
|
} |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
__PACKAGE__ |
|
62
|
|
|
|
|
|
|
__END__ |