Object/Publisher.pm

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