NAME

Data::MARC::Field008::ComputerFile - Data object for MARC field 008 computer file material.

SYNOPSIS

use Data::MARC::Field008::ComputerFile;

my $obj = Data::MARC::Field008::ComputerFile->new(%params);
my $form_of_item = $obj->form_of_item;
my $government_publication = $obj->government_publication;
my $raw = $obj->raw;
my $target_audience = $obj->target_audience;
my $type_of_computer_file = $obj->type_of_computer_file;

METHODS

new

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

Constructor.

  • form_of_item

    Form of item. The length of the item is 1 character. Possible characters are ' ', 'o', 'q' or '|'.

    It's required.

    Default value is undef.

  • government_publication

    Government publication. The length of the string is 1 character. Possible characters are ' ', 'a', 'c', 'f', 'i', 'l', 'm', 'o', 's', 'u', 'z' 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.

  • target_audience

    Target audience. The length of the item is 1 character. Possible characters are ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'j' or '|'.

    It's required.

    Default value is undef.

  • type_of_computer_file

    Type of computer file. The length of the item is 1 character. Possible characters are 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'm', 'u', 'z' or '|'.

    It's required.

    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.

government_publication

my $government_publication = $obj->government_publication;

Get government publication.

Returns string.

raw

my $raw = $obj->form_of_item;

Get raw string of the block.

Returns string.

target_audience

my $target_audience = $obj->target_audience;

Get target audience.

Returns string.

type_of_computer_file

my $type_of_computer_file = $obj->type_of_computer_file;

Get type of computer file.

Returns string.

ERRORS

new():
        Couldn't create data object of computer file.
                Raw string: %s
        Parameter 'raw' has length different than '17'.
                Value: %s
        From Data::MARC::Field008::Utils::check_computer_file_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
        From Data::MARC::Field008::Utils::check_computer_file_type():
                Parameter 'type_of_computer_file' has bad value.
                        Value: %s
                Parameter 'type_of_computer_file' is required.
                Parameter 'type_of_computer_file' length is bad.
                        Length: %s
                        Value: %s
                        Expected length: 1
                Parameter 'type_of_computer_file' must be a scalar value.
                        Reference: %s
        From Data::MARC::Field008::Utils::check_government_publication():
                Parameter 'government_publication' has bad value.
                        Value: %s
                Parameter 'government_publication' is required.
                Parameter 'government_publication' length is bad.
                        Length: %s
                        Value: %s
                        Expected length: 1
                Parameter 'government_publication' must be a scalar value.
                        Reference: %s
        From Data::MARC::Field008::Utils::check_target_audience():
                Parameter 'target_audience' has bad value.
                        Value: %s
                Parameter 'target_audience' is required.
                Parameter 'target_audience' length is bad.
                        Length: %s
                        Value: %s
                        Expected length: 1
                Parameter 'target_audience' must be a scalar value.
                        Reference: %s

EXAMPLE

use strict;
use warnings;

use Data::Printer;
use Data::MARC::Field008::ComputerFile;

# cnb000208289
my $obj = Data::MARC::Field008::ComputerFile->new(
        'form_of_item' => ' ',
        'government_publication' => ' ',
        #         89012345678901234
        'raw' => '        m        ',
        'target_audience' => ' ',
        'type_of_computer_file' => 'm',
);

# Print out.
p $obj;

# Output:
# Data::MARC::Field008::ComputerFile  {
#     parents: Mo::Object
#     public methods (9):
#         BUILD
#         Data::MARC::Field008::Utils:
#             check_computer_file_item_form, check_computer_file_type, check_government_publication, check_target_audience
#         Error::Pure:
#             err
#         Error::Pure::Utils:
#             err_get
#         Mo::utils:
#             check_length_fix, check_required
#     private methods (0)
#     internals: {
#         form_of_item             " ",
#         government_publication   " ",
#         raw                      "        m        ",
#         target_audience          " ",
#         type_of_computer_file    "m"
#     }
# }

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