NAME

Data::MARC::Field008::MixedMaterial - Data object for MARC field 008 mixed material.

SYNOPSIS

use Data::MARC::Field008::MixedMaterial;

my $obj = Data::MARC::Field008::MixedMaterial->new(%params);
my $form_of_item = $obj->form_of_item;
my $raw = $obj->form_of_item;

METHODS

new

my $obj = Data::MARC::Field008::MixedMaterial->new(%params);

Constructor.

  • form_of_item

    Form of item. The length of the item is 1 character. Possible characters are ' ', 'a', 'b', 'c', 'd', 'f', 'o', 'q', 'r', 's' or '|'.

    It's required.

    Default value is undef.

  • raw

    Raw string of material. The length of the string is 17 characters.

    It's optional.

    Default value is undef.

Returns instance of object.

form_of_item

my $form_of_item = $obj->form_of_item;

Get form of item.

Returns string

raw

my $raw = $obj->form_of_item;

Get raw string of the block.

Returns string.

ERRORS

new():
        Couldn't create data object of mixed material.
                Raw string: %s
        Parameter 'raw' has length different than '17'.
                Value: %s
        From Data::MARC::Field008::Utils::check_item_form():
                Parameter 'form_of_item' has bad value.
                        Value: %s
                Parameter 'form_of_item' is required.
                Parameter 'form_of_item' length is bad.
                        Length: %s
                        Value: %s
                        Expected length: 1
                Parameter 'form_of_item' must be a scalar value.
                        Reference: %s

EXAMPLE

use strict;
use warnings;

use Data::Printer;
use Data::MARC::Field008::MixedMaterial;

my $obj = Data::MARC::Field008::MixedMaterial->new(
        'form_of_item' => 'o',
        #         89012345678901234
        'raw' => '     o           ',
);

# Print out.
p $obj;

# Output:
# Data::MARC::Field008::MixedMaterial  {
#     parents: Mo::Object
#     public methods (7):
#         BUILD
#         Data::MARC::Field008::Utils:
#             check_item_form
#         Error::Pure:
#             err
#         Error::Pure::Utils:
#             err_get
#         Mo::utils:
#             check_length_fix, check_required, check_strings
#     private methods (0)
#     internals: {
#         form_of_item   "o",
#         raw            "     o           "
#     }
# }

DEPENDENCIES

Data::MARC::Field008::Utils, Error::Pure Error::Pure::Utils Mo, Mo::utils.

REPOSITORY

https://github.com/michal-josef-spacek/Data-MARC-Field008

AUTHOR

Michal Josef Špaček mailto:skim@cpan.org

http://skim.cz

LICENSE AND COPYRIGHT

© 2025 Michal Josef Špaček

BSD 2-Clause License

VERSION

0.03