Moose/Formater.pm

filter: Statementstmt 75.0% 6 / 8 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 25.0% 1 / 4 Podpod 100% 3 / 3 totaltotal 66.6% 10 / 15 CC 1 SCAR 2.2
CC
1
Cov
75%
format
2.0
BEGIN
1.0
begin
1.0
CRAP 1.2
« Moose/Reader/File/Iso2709.pm ↑ Summary Moose/Parser/MarcxmlSax.pm »
1 package MARC::Moose::Formater;
2 # ABSTRACT: Base class to format Marc record
3 4 $MARC::Moose::Formater::VERSION = '1.0.46';
4 4 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
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 ▶sub begin { }
Subroutine begin: not called CC=1 SCAR=0.0
Pod documented
16  
17 ▶sub end { }
Subroutine end: not called CC=1 SCAR=0.0
Pod documented
18  
19  
20 sub format {
21 0 ▶ my ($self, $record) = @_;
Subroutine format: not called CC=1 SCAR=6.9
Pod documented
22 0 return "Marc Record";
23 };
24  
25 4 __PACKAGE__->meta->make_immutable;
26  
27 4 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.46
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) 2022 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
« Moose/Reader/File/Iso2709.pm ↑ Summary Moose/Parser/MarcxmlSax.pm »