line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catmandu::Fix::Inline::marc_add; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
46896
|
use Catmandu::MARC; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
202
|
|
4
|
|
|
|
|
|
|
require Exporter; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
@ISA = qw(Exporter); |
7
|
|
|
|
|
|
|
@EXPORT_OK = qw(marc_add); |
8
|
|
|
|
|
|
|
%EXPORT_TAGS = (all => [qw(marc_add)]); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '1.20'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub marc_add { |
13
|
3
|
|
|
3
|
0
|
1686
|
my ($data,$marc_path,@subfields) = @_; |
14
|
3
|
|
|
|
|
14
|
return Catmandu::MARC->instance->marc_add($data, $marc_path, @subfields); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 NAME |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
Catmandu::Fix::Inline::marc_add- A marc_add-er for Perl scripts (DEPRECATED) |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 SYNOPSIS |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
use Catmandu::Fix::Inline::marc_add qw(:all); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# Set to a literal value |
26
|
|
|
|
|
|
|
my $data = marc_add($data, '245', a => 'value'); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
# Set to a copy of a deeply nested JSON path |
29
|
|
|
|
|
|
|
my $data = marc_add($data, '245', a => '$.my.deep.field'); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 DEPRECATED |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
This module is deprecated. Use the inline functionality of L<Catmandu::Fix::marc_add> instead. |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 SEE ALSO |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
L<Catmandu::Fix::marc_add> |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=cut |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |