line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::revealup::cli::export; |
2
|
3
|
|
|
3
|
|
1092
|
use App::revealup::base; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
17
|
|
3
|
3
|
|
|
3
|
|
853
|
use Pod::Usage; |
|
3
|
|
|
|
|
86509
|
|
|
3
|
|
|
|
|
268
|
|
4
|
3
|
|
|
3
|
|
807
|
use Try::Tiny; |
|
3
|
|
|
|
|
3242
|
|
|
3
|
|
|
|
|
136
|
|
5
|
3
|
|
|
3
|
|
15
|
use Carp qw/croak/; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
656
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
has 'sub_commands' => [qw/html theme/]; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub run { |
10
|
3
|
|
|
3
|
0
|
11
|
my ($self, $sub_command, @args) = @_; |
11
|
3
|
50
|
|
|
|
12
|
usage() if !$sub_command; |
12
|
3
|
100
|
|
|
|
8
|
if ($sub_command eq 'generate'){ |
13
|
1
|
|
|
|
|
2
|
$sub_command = 'theme'; |
14
|
|
|
|
|
|
|
} |
15
|
3
|
50
|
|
|
|
4
|
if( grep { $_ eq $sub_command } @{$self->sub_commands} ) { |
|
6
|
|
|
|
|
17
|
|
|
3
|
|
|
|
|
9
|
|
16
|
3
|
|
|
|
|
12
|
my $klass = sprintf("App::revealup::cli::export::%s", lc($sub_command)); |
17
|
3
|
50
|
|
|
|
156
|
if(eval "require $klass;1;"){ |
18
|
3
|
|
|
|
|
14
|
my $instance = $klass->new(); |
19
|
|
|
|
|
|
|
try { |
20
|
3
|
|
|
3
|
|
156
|
$instance->run(@args); |
21
|
|
|
|
|
|
|
}catch{ |
22
|
0
|
|
|
0
|
|
0
|
croak $_; |
23
|
3
|
|
|
|
|
21
|
}; |
24
|
3
|
|
|
|
|
62
|
return; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
} |
27
|
0
|
|
|
|
|
|
usage(); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub usage { |
31
|
0
|
|
|
0
|
0
|
|
system "perldoc App::revealup::cli::export"; |
32
|
0
|
|
|
|
|
|
exit; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |