| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use Catmandu::Sane; |
|
3
|
2
|
|
|
2
|
|
14
|
|
|
|
2
|
|
|
|
|
3
|
|
|
|
2
|
|
|
|
|
20
|
|
|
4
|
|
|
|
|
|
|
our $VERSION = '1.2018'; |
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use Moo; |
|
7
|
2
|
|
|
2
|
|
13
|
use namespace::clean; |
|
|
2
|
|
|
|
|
3
|
|
|
|
2
|
|
|
|
|
17
|
|
|
8
|
2
|
|
|
2
|
|
757
|
|
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
18
|
|
|
9
|
|
|
|
|
|
|
with 'Catmandu::Importer'; |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my ($self) = @_; |
|
12
|
|
|
|
|
|
|
my $n = 0; |
|
13
|
|
|
|
|
|
|
sub { |
|
14
|
|
|
|
|
|
|
return undef if $n++; |
|
15
|
|
|
|
|
|
|
+{}; |
|
16
|
|
|
|
|
|
|
}; |
|
17
|
|
|
|
|
|
|
} |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
1; |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=pod |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 NAME |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
Catmandu::Importer::Null - Null importer used for testing purposes |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
# From the command line |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
catmandu convert Null --fix 'add_field(foo,bar)' |
|
33
|
|
|
|
|
|
|
# creates { "foo": "bar" } |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# In a Perl script |
|
36
|
|
|
|
|
|
|
use Catmandu; |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
my $importer = Catmandu->importer('Null'); |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
my $n = $importer->each(sub { |
|
41
|
|
|
|
|
|
|
my $hashref = $_[0]; |
|
42
|
|
|
|
|
|
|
# ... |
|
43
|
|
|
|
|
|
|
}); |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
The importer generates one empty record and then exists. This importer can be used to |
|
48
|
|
|
|
|
|
|
test fix functions, generating a single record. |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 METHODS |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Every L<Catmandu::Importer> is a L<Catmandu::Iterable> all its methods are |
|
53
|
|
|
|
|
|
|
inherited. |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
L<Catmandu::Exporter::Null> |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=cut |