line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MARC::Moose::Formater::Text; |
2
|
|
|
|
|
|
|
# ABSTRACT: Record formater into a text representation |
3
|
|
|
|
|
|
|
$MARC::Moose::Formater::Text::VERSION = '1.0.46'; |
4
|
4
|
|
|
4
|
|
32
|
use Moose; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
24
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
extends 'MARC::Moose::Formater'; |
7
|
|
|
|
|
|
|
|
8
|
4
|
|
|
4
|
|
26568
|
use MARC::Moose::Field::Control; |
|
4
|
|
|
|
|
35
|
|
|
4
|
|
|
|
|
129
|
|
9
|
4
|
|
|
4
|
|
101
|
use MARC::Moose::Field::Std; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
891
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
override 'format' => sub { |
13
|
|
|
|
|
|
|
my ($self, $record) = @_; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
my $text = join "\n", |
16
|
|
|
|
|
|
|
$record->leader, |
17
|
|
|
|
|
|
|
map { |
18
|
|
|
|
|
|
|
$_->tag . |
19
|
|
|
|
|
|
|
( ref($_) eq 'MARC::Moose::Field::Control' |
20
|
|
|
|
|
|
|
? ' ' . $_->value |
21
|
|
|
|
|
|
|
: ' ' . $_->ind1 . $_->ind2 . ' ' . |
22
|
|
|
|
|
|
|
join ' ', map { ('$' . $_->[0], $_->[1] ) } @{$_->subf} |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
} @{ $record->fields }; |
25
|
|
|
|
|
|
|
return $text . "\n\n"; |
26
|
|
|
|
|
|
|
}; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=pod |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=encoding UTF-8 |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 NAME |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
MARC::Moose::Formater::Text - Record formater into a text representation |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 VERSION |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
version 1.0.46 |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 AUTHOR |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Frédéric Demians <f.demians@tamil.fr> |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
This software is copyright (c) 2022 by Frédéric Demians. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
55
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=cut |