line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catmandu::Fix::Base; |
2
|
|
|
|
|
|
|
|
3
|
107
|
|
|
107
|
|
60802
|
use Catmandu::Sane; |
|
107
|
|
|
|
|
273
|
|
|
107
|
|
|
|
|
871
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '1.2020'; |
6
|
|
|
|
|
|
|
|
7
|
107
|
|
|
107
|
|
2270
|
use Catmandu::Fix; |
|
107
|
|
|
|
|
285
|
|
|
107
|
|
|
|
|
2348
|
|
8
|
107
|
|
|
107
|
|
580
|
use Moo::Role; |
|
107
|
|
|
|
|
232
|
|
|
107
|
|
|
|
|
682
|
|
9
|
107
|
|
|
107
|
|
42394
|
use namespace::clean; |
|
107
|
|
|
|
|
394
|
|
|
107
|
|
|
|
|
707
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
with 'Catmandu::Logger'; |
12
|
|
|
|
|
|
|
with 'Catmandu::Fix::Inlineable'; |
13
|
|
|
|
|
|
|
with 'Catmandu::Emit'; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
requires 'emit'; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub fix { |
18
|
319
|
|
|
319
|
0
|
12553
|
my ($self, $data) = @_; |
19
|
319
|
|
|
|
|
5884
|
Catmandu::Fix->new(fixes => [$self])->fix($data); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
__END__ |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=pod |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 NAME |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Catmandu::Fix::Base - Base role for all code emitting Catmandu fixes |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 SYNOPSIS |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
package Catmandu::Fix::my_fix; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
use Catmandu::Sane; |
37
|
|
|
|
|
|
|
use Moo; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
with 'Catmandu::Fix::Base'; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub emit { |
42
|
|
|
|
|
|
|
my ($self, $fixer) = @_; |
43
|
|
|
|
|
|
|
....FIXER GENERATING CODE.... |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 SEE ALSO |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
For more information how to create fixes read the following two blog posts: |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
http://librecat.org/catmandu/2014/03/14/create-a-fixer.html |
51
|
|
|
|
|
|
|
http://librecat.org/catmandu/2014/03/26/creating-a-fixer-2.html |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=cut |