Object/Series.pm

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 96.1% 25 / 26 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Object/Publisher.pm ↑ Summary Object/People.pm »
1 package MARC::Convert::Wikidata::Object::Series;
2  
3 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 7 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 7 ▶use Mo qw(build is);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 7 ▶use Mo::utils qw(check_required);
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 7 our $VERSION = 0.01;
10  
11 7 has name => (
12 is => 'ro',
13 );
14  
15 7 has publisher => (
16 is => 'ro',
17 );
18  
19 7 has series_ordinal => (
20 is => 'ro',
21 );
22  
23 sub BUILD {
24 8 ▶ my $self = shift;
Subroutine BUILD: called CC=1 SCAR=0.0
Pod undocumented
25  
26 8 check_required($self, 'name');
27  
28 7 return;
29 }
30  
31 7 1;
32  
33 __END__
34  
35 =pod
36  
37 =encoding utf8
38  
39 =head1 NAME
40  
41 MARC::Convert::Wikidata::Object::Series - Bibliographic Wikidata object for series defined by MARC record.
42  
43 =head1 SYNOPSIS
44  
45 use MARC::Convert::Wikidata::Object::Series;
46  
47 my $obj = MARC::Convert::Wikidata::Object::Series->new(%params);
48 my $name = $obj->name;
49 my $publisher = $obj->publisher;
50 my $series_ordinal = $obj->series_ordinal;
51  
52 =head1 METHODS
53  
54 =head2 C<new>
55  
56 my $obj = MARC::Convert::Wikidata::Object::Series->new(%params);
57  
58 Constructor.
59  
60 Returns instance of object.
61  
62 =over 8
63  
64 =item * C<name>
65  
66 Name of book series.
67  
68 Parameter is required.
69  
70 =item * C<publisher>
71  
72 Name of publishing house.
73  
74 Default value is undef.
75  
76 =item * C<series_ordinal>
77  
78 Series ordinal.
79  
80 Default value is undef.
81  
82 =back
83  
84 =head2 C<name>
85  
86 my $name = $obj->name;
87  
88 Get name of book series.
89  
90 Returns string.
91  
92 =head2 C<place>
93  
94 my $place = $obj->publisher;
95  
96 Get name of publishing house.
97  
98 Returns string.
99  
100 =head2 C<series_ordinal>
101  
102 my $series_ordinal = $obj->series_ordinal;
103  
104 Get series ordinal.
105  
106 Returns string.
107  
108 =head1 ERRORS
109  
110 new():
111 Parameter 'name' is required.
112  
113 =head1 EXAMPLE1
114  
115 =for comment filename=create_and_dump_series.pl
116  
117 use strict;
118 use warnings;
119  
120 use Data::Printer;
121 use MARC::Convert::Wikidata::Object::Series;
122 use Unicode::UTF8 qw(decode_utf8);
123
124 my $obj = MARC::Convert::Wikidata::Object::Series->new(
125 'name' => decode_utf8('Malé encyklopedie'),
126 'publisher' => decode_utf8('Mladá Fronta'),
127 'series_ordinal' => 5,
128 );
129
130 p $obj;
131  
132 # Output:
133 # MARC::Convert::Wikidata::Object::Series {
134 # Parents Mo::Object
135 # public methods (6) : BUILD, can (UNIVERSAL), DOES (UNIVERSAL), check_required (Mo::utils), isa (UNIVERSAL), VERSION (UNIVERSAL)
136 # private methods (1) : __ANON__ (Mo::is)
137 # internals: {
138 # name "Mal� encyklopedie",
139 # publisher "Mlad� Fronta",
140 # series_ordinal 5
141 # }
142 # }
143  
144 =head1 DEPENDENCIES
145  
146 L<Mo>,
147 L<Mo::utils>.
148  
149 =head1 SEE ALSO
150  
151 =over
152  
153 =item L<MARC::Convert::Wikidata>
154  
155 Conversion class between MARC record and Wikidata object.
156  
157 =back
158  
159 =head1 REPOSITORY
160  
161 L<https://github.com/michal-josef-spacek/MARC-Convert-Wikidata-Object>
162  
163 =head1 AUTHOR
164  
165 Michal Josef Špaček L<mailto:skim@cpan.org>
166  
167 L<http://skim.cz>
168  
169 =head1 LICENSE AND COPYRIGHT
170  
171 © Michal Josef Špaček 2021-2023
172  
173 BSD 2-Clause License
174  
175 =head1 VERSION
176  
177 0.01
178  
179 =cut
« Object/Publisher.pm ↑ Summary Object/People.pm »