line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catmandu::Fix::marc_decode_dollar_subfields; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
832
|
use Catmandu::Sane; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
12
|
|
4
|
1
|
|
|
1
|
|
809
|
use Catmandu::MARC; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
26
|
|
5
|
1
|
|
|
1
|
|
7
|
use Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
6
|
1
|
|
|
1
|
|
736
|
use Catmandu::Fix::Has; |
|
1
|
|
|
|
|
826
|
|
|
1
|
|
|
|
|
6
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
with 'Catmandu::Fix::Inlineable'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '1.21'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub fix { |
13
|
1
|
|
|
1
|
0
|
2513
|
my ($self,$data) = @_; |
14
|
1
|
|
|
|
|
7
|
return Catmandu::MARC->instance->marc_decode_dollar_subfields($data); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 NAME |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
Catmandu::Fix::marc_decode_dollar_subfields - decode double encoded dollar subfields |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 SYNOPSIS |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
marc_decode_dollar_subfields() |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 DESCRIPTION |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
In some environments MARC subfields can contain data values that can be interpreted |
28
|
|
|
|
|
|
|
as subfields itself. E.g. when the 245-$a subfield contains the data: |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
My Title $h subsubfield |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
then the $h = subsubfield will not be accessible with normal MARC processing tools. |
33
|
|
|
|
|
|
|
Use the 'marc_decode_dollar_subfields()' fix to re-evaluate all the MARC subfields |
34
|
|
|
|
|
|
|
for these hidden data. |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 METHODS |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head2 marc_decode_dollar_subfields() |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Decode double encoded dollar subfields into real MARC subfields. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 INLINE |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
This Fix can be used inline in a Perl script: |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
use Catmandu::Fix::marc_decode_dollar_subfields as => 'marc_decode_dollar_subfields'; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
my $data = { record => [...] }; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
$data = marc_decode_dollar_subfields($data); |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 SEE ALSO |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
L<Catmandu::Fix> |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=cut |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |