line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Dash::BaseComponent; |
2
|
|
|
|
|
|
|
|
3
|
9
|
|
|
9
|
|
72719
|
use Moo; |
|
9
|
|
|
|
|
11274
|
|
|
9
|
|
|
|
|
58
|
|
4
|
9
|
|
|
9
|
|
4593
|
use strictures 2; |
|
9
|
|
|
|
|
1700
|
|
|
9
|
|
|
|
|
423
|
|
5
|
9
|
|
|
9
|
|
2289
|
use namespace::clean; |
|
9
|
|
|
|
|
11079
|
|
|
9
|
|
|
|
|
54
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub DashNamespace { |
8
|
2
|
|
|
2
|
0
|
1056
|
return 'no_namespace'; |
9
|
|
|
|
|
|
|
} |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub TO_JSON { |
12
|
4
|
|
|
4
|
0
|
9
|
my $self = shift; |
13
|
4
|
|
|
|
|
16
|
my @components = split( /::/, ref($self) ); |
14
|
4
|
|
|
|
|
8
|
my $type = $components[-1]; |
15
|
4
|
|
|
|
|
18
|
my %hash = %$self; |
16
|
4
|
100
|
|
|
|
14
|
if ( !exists $hash{children} ) { |
17
|
2
|
|
|
|
|
9
|
$hash{children} = undef; |
18
|
|
|
|
|
|
|
} |
19
|
4
|
|
|
|
|
18
|
return { type => $type, |
20
|
|
|
|
|
|
|
namespace => $self->DashNamespace, |
21
|
|
|
|
|
|
|
props => \%hash |
22
|
|
|
|
|
|
|
}; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |