line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Dash::BaseComponent; |
2
|
|
|
|
|
|
|
|
3
|
9
|
|
|
9
|
|
60768
|
use Moo; |
|
9
|
|
|
|
|
9379
|
|
|
9
|
|
|
|
|
51
|
|
4
|
9
|
|
|
9
|
|
3888
|
use strictures 2; |
|
9
|
|
|
|
|
1368
|
|
|
9
|
|
|
|
|
321
|
|
5
|
9
|
|
|
9
|
|
1914
|
use namespace::clean; |
|
9
|
|
|
|
|
9284
|
|
|
9
|
|
|
|
|
69
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub DashNamespace { |
8
|
2
|
|
|
2
|
0
|
912
|
return 'no_namespace'; |
9
|
|
|
|
|
|
|
} |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub TO_JSON { |
12
|
4
|
|
|
4
|
0
|
8
|
my $self = shift; |
13
|
4
|
|
|
|
|
12
|
my @components = split( /::/, ref($self) ); |
14
|
4
|
|
|
|
|
7
|
my $type = $components[-1]; |
15
|
4
|
|
|
|
|
16
|
my %hash = %$self; |
16
|
4
|
100
|
|
|
|
36
|
if ( !exists $hash{children} ) { |
17
|
2
|
|
|
|
|
8
|
$hash{children} = undef; |
18
|
|
|
|
|
|
|
} |
19
|
4
|
|
|
|
|
12
|
return { type => $type, |
20
|
|
|
|
|
|
|
namespace => $self->DashNamespace, |
21
|
|
|
|
|
|
|
props => \%hash |
22
|
|
|
|
|
|
|
}; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |