line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MARC::Moose::Formater; |
2
|
|
|
|
|
|
|
# ABSTRACT: Base class to format Marc record |
3
|
|
|
|
|
|
|
$MARC::Moose::Formater::VERSION = '1.0.44'; |
4
|
4
|
|
|
4
|
|
2589
|
use Moose; |
|
4
|
|
|
|
|
17
|
|
|
4
|
|
|
|
|
31
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# FIXME Experimental. Not used yet. |
8
|
|
|
|
|
|
|
#has converter => ( |
9
|
|
|
|
|
|
|
# is => 'rw', |
10
|
|
|
|
|
|
|
# isa => 'Text::IconvPtr', |
11
|
|
|
|
|
|
|
# default => sub { Text::Iconv->new( "cp857", "utf8" ) } |
12
|
|
|
|
|
|
|
#); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
0
|
1
|
|
sub begin { } |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
0
|
1
|
|
sub end { } |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub format { |
21
|
0
|
|
|
0
|
1
|
|
my ($self, $record) = @_; |
22
|
0
|
|
|
|
|
|
return "Marc Record"; |
23
|
|
|
|
|
|
|
}; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=pod |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=encoding UTF-8 |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 NAME |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
MARC::Moose::Formater - Base class to format Marc record |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 VERSION |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
version 1.0.44 |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 DESCRIPTION |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
A Marc formater is used by any writer to transform a Marc record into something |
46
|
|
|
|
|
|
|
undestandable by human (text readable format) or by machine (standartized format |
47
|
|
|
|
|
|
|
like ISO2709 or MARCXML). |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
A formater surclass this base class 3 methods to format a set of Marc records. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 METHODS |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head2 begin |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Prior to formating a set of records one by one calling I<format> method, a |
56
|
|
|
|
|
|
|
writer may need an header which is returned by this method. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head2 end |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
A the end of formating a set of records, it may be required by a writer to |
61
|
|
|
|
|
|
|
finished its stream of date by a footer. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head2 format |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Returns something (a string, another object) containing a representation of a |
66
|
|
|
|
|
|
|
MARC record. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
# $formater type is Marc::Formater subclass |
69
|
|
|
|
|
|
|
# $record type Marc::Record or any subclass |
70
|
|
|
|
|
|
|
my $formatted_string = $formater->format( $record ); |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 SEE ALSO |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=over 4 |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=item * |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
L<MARC::Moose> |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=item * |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
L<MARC::Moose::Formater::Iso2709> |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=item * |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
L<MARC::Moose::Formater::Marcxml> |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=item * |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
L<MARC::Moose::Formater::Text> |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=item * |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
L<MARC::Moose::Formater::Yaml> |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=item * |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
L<MARC::Moose::Formater::UnimarcToMarc21> |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=item * |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
L<MARC::Moose::Lint::Processor> |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=back |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head1 AUTHOR |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
Frédéric Demians <f.demians@tamil.fr> |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
This software is copyright (c) 2021 by Frédéric Demians. |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
115
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=cut |