line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
3
|
|
|
3
|
|
464
|
use 5.006; # our |
|
3
|
|
|
|
|
6
|
|
2
|
3
|
|
|
3
|
|
12
|
use strict; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
54
|
|
3
|
3
|
|
|
3
|
|
9
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
194
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package CPAN::Changes::Markdown::Filter::Rule::VersionsToCode; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# ABSTRACT: Quote things that look like numbers as code entries. |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '1.000002'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY |
12
|
|
|
|
|
|
|
|
13
|
3
|
|
|
3
|
|
435
|
use Moo qw( with ); |
|
3
|
|
|
|
|
9781
|
|
|
3
|
|
|
|
|
21
|
|
14
|
3
|
|
|
3
|
|
1982
|
use CPAN::Changes::Markdown::Filter::NodeUtil qw( mk_node_plaintext mk_node_delimitedtext ); |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
15
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
with 'CPAN::Changes::Markdown::Role::Filter::Rule::PlainText'; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub _inject_code_delim { |
40
|
14
|
|
|
14
|
|
42
|
my ( $self, $out, $before, $code, $after ) = @_; |
41
|
14
|
|
|
|
|
18
|
push @{$out}, mk_node_plaintext($before); |
|
14
|
|
|
|
|
33
|
|
42
|
14
|
|
|
|
|
173
|
push @{$out}, mk_node_delimitedtext( q{`}, $code, q{`} ); |
|
14
|
|
|
|
|
33
|
|
43
|
14
|
|
|
|
|
1156
|
push @{$out}, $self->filter_plaintext( mk_node_plaintext($after) ); |
|
14
|
|
|
|
|
33
|
|
44
|
14
|
|
|
|
|
17
|
return @{$out}; |
|
14
|
|
|
|
|
49
|
|
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
# _Pulp__5010_qr_m_propagate_properly |
48
|
|
|
|
|
|
|
## no critic (Compatibility::PerlMinimumVersionAndWhy) |
49
|
|
|
|
|
|
|
my $re_version = qr/(\A|\A.*?\s) ( v? [\d._]+ (?:-TRIAL)? ) (\z|\s.*\z)/msx; |
50
|
|
|
|
|
|
|
my $re_number = qr/ \d /msx; |
51
|
|
|
|
|
|
|
## use critic |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub filter_plaintext { |
58
|
34
|
|
|
34
|
1
|
201
|
my ( $self, $input ) = @_; |
59
|
34
|
100
|
|
|
|
171
|
if ( $input->content !~ $re_number ) { |
60
|
20
|
|
|
|
|
38
|
return $input; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
14
|
50
|
|
|
|
90
|
if ( $input->content =~ $re_version ) { |
64
|
14
|
|
|
|
|
35
|
return $self->_inject_code_delim( [], $1, $2, $3 ); |
65
|
|
|
|
|
|
|
} |
66
|
0
|
|
|
|
|
|
return $input; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
1; |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
__END__ |