File Coverage

blib/lib/Catmandu/Fix/Inline/marc_set.pm
Criterion Covered Total %
statement 5 5 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod 0 1 0.0
total 7 8 87.5


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