line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl6::Pod::Codeactions; |
2
|
6
|
|
|
6
|
|
41952
|
use Perl6::Pod::Lex::FormattingCode; |
|
6
|
|
|
|
|
16
|
|
|
6
|
|
|
|
|
134
|
|
3
|
6
|
|
|
6
|
|
32
|
use strict; |
|
6
|
|
|
|
|
8
|
|
|
6
|
|
|
|
|
120
|
|
4
|
6
|
|
|
6
|
|
30
|
use warnings; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
134
|
|
5
|
6
|
|
|
6
|
|
44
|
use Data::Dumper; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
348
|
|
6
|
6
|
|
|
6
|
|
30
|
use Carp; |
|
6
|
|
|
|
|
9
|
|
|
6
|
|
|
|
|
2868
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
13
|
|
|
13
|
0
|
29
|
my $class = shift; |
11
|
13
|
50
|
33
|
|
|
122
|
my $self = bless( ( $#_ == 0 ) ? shift : {@_}, ref($class) || $class ); |
12
|
13
|
|
|
|
|
62
|
$self; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub tidy_format_codes_content { |
16
|
14
|
|
|
14
|
0
|
27
|
my @res = (); |
17
|
14
|
|
|
|
|
19
|
my $tmp = ''; |
18
|
14
|
|
|
|
|
39
|
foreach my $c (@_) { |
19
|
24
|
100
|
|
|
|
51
|
if (ref($c)) { |
20
|
15
|
100
|
|
|
|
36
|
if ( $tmp ) |
21
|
|
|
|
|
|
|
{ |
22
|
2
|
|
|
|
|
5
|
push @res, $tmp; |
23
|
2
|
|
|
|
|
3
|
$tmp = ''; |
24
|
|
|
|
|
|
|
} |
25
|
15
|
|
|
|
|
39
|
push @res, $c; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
} else { |
28
|
9
|
|
|
|
|
16
|
$tmp .= $c; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
} |
31
|
14
|
100
|
|
|
|
30
|
push @res, $tmp if $tmp; |
32
|
14
|
|
|
|
|
49
|
@res; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub Text { |
37
|
13
|
|
|
13
|
0
|
353
|
my $self = shift; |
38
|
13
|
|
|
|
|
21
|
my $rec = shift; |
39
|
13
|
50
|
|
|
|
40
|
if ( my $content = $rec->{content} ) { |
40
|
13
|
|
|
|
|
28
|
$rec->{content} = [ tidy_format_codes_content(@$content) ]; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
return $rec->{content} |
43
|
13
|
|
|
|
|
37
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub D_code { |
46
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
47
|
0
|
|
|
|
|
0
|
my $rec = shift; |
48
|
0
|
|
|
|
|
0
|
return Perl6::Pod::Lex::FormattingCode->new($rec); |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub C_code { |
52
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
53
|
0
|
|
|
|
|
0
|
my $rec = shift; |
54
|
0
|
|
|
|
|
0
|
return Perl6::Pod::Lex::FormattingCode->new($rec); |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub X_code { |
58
|
3
|
|
|
3
|
0
|
117
|
my $self = shift; |
59
|
3
|
|
|
|
|
6
|
my $rec = shift; |
60
|
3
|
|
|
|
|
22
|
return Perl6::Pod::Lex::FormattingCode->new($rec); |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
sub L_code { |
64
|
10
|
|
|
10
|
0
|
410
|
my $self = shift; |
65
|
10
|
|
|
|
|
15
|
my $rec = shift; |
66
|
10
|
|
|
|
|
71
|
return Perl6::Pod::Lex::FormattingCode->new($rec); |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub default_formatting_code { |
70
|
1
|
|
|
1
|
0
|
35
|
my $self = shift; |
71
|
1
|
|
|
|
|
2
|
my $rec = shift; |
72
|
1
|
50
|
|
|
|
5
|
if ( my $content = $rec->{content} ) { |
73
|
1
|
|
|
|
|
5
|
$rec->{content} = [ tidy_format_codes_content(@$content) ]; |
74
|
|
|
|
|
|
|
} |
75
|
1
|
|
|
|
|
5
|
return Perl6::Pod::Lex::FormattingCode->new($rec); |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
1; |
78
|
|
|
|
|
|
|
|