line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::revealup::cli::export; |
2
|
3
|
|
|
3
|
|
976
|
use App::revealup::base; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
22
|
|
3
|
3
|
|
|
3
|
|
1674
|
use Pod::Usage; |
|
3
|
|
|
|
|
113863
|
|
|
3
|
|
|
|
|
416
|
|
4
|
3
|
|
|
3
|
|
1831
|
use Try::Tiny; |
|
3
|
|
|
|
|
2852
|
|
|
3
|
|
|
|
|
158
|
|
5
|
3
|
|
|
3
|
|
14
|
use Carp qw/croak/; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
703
|
|
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
|
|
|
|
8
|
usage() if !$sub_command; |
12
|
3
|
100
|
|
|
|
10
|
if ($sub_command eq 'generate'){ |
13
|
1
|
|
|
|
|
2
|
$sub_command = 'theme'; |
14
|
|
|
|
|
|
|
} |
15
|
3
|
50
|
|
|
|
6
|
if( grep { $_ eq $sub_command } @{$self->sub_commands} ) { |
|
6
|
|
|
|
|
23
|
|
|
3
|
|
|
|
|
13
|
|
16
|
3
|
|
|
|
|
15
|
my $klass = sprintf("App::revealup::cli::export::%s", lc($sub_command)); |
17
|
3
|
50
|
|
|
|
150
|
if(eval "require $klass;1;"){ |
18
|
3
|
|
|
|
|
20
|
my $instance = $klass->new(); |
19
|
|
|
|
|
|
|
try { |
20
|
3
|
|
|
3
|
|
118
|
$instance->run(@args); |
21
|
|
|
|
|
|
|
}catch{ |
22
|
0
|
|
|
0
|
|
0
|
croak $_; |
23
|
3
|
|
|
|
|
30
|
}; |
24
|
3
|
|
|
|
|
77
|
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__ |