<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    MARC::Field008 - Class for parsing and serialization of MARC field 008.

SYNOPSIS
     use MARC::Field008;

     my $obj = MARC::Field008-&gt;new(%params);
     my $data_obj = $cnf-&gt;parse($field_008);
     my $field_008 = $cnf-&gt;serialize($data_obj);

METHODS
  "new"
     my $obj = MARC::Field008-&gt;new(%params);

    Constructor.

    *       "leader"

            MARC leader string.

            It's required.

            Default is undef.

    *       "verbose"

            Verbose mode.

            Default is 0.

    Returns instance of object.

  "parse"
     my $data_obj = $cnf-&gt;parse($field_008);

    Parse MARC field 008 string to data object.

    Returns instance of Data::MARC::Field008.

  "serialize"
     my $field_008 = $cnf-&gt;serialize($data_obj);

    Serialize Data::MARC::Field008 object to string..

    Returns string.

ERRORS
     new():
             From Mo::utils::check_bool():
                     Parameter 'verbose' must be a bool (0/1).
                             Value: %s
             From Mo::utils::check_isa():
                     Parameter 'leader' must be a 'Data::MARC::Leader' object.
                             Value: %s
                             Reference: %s
             From Mo::utils::check_required():
                     Parameter 'leader' is required.
             From Class::Utils::set_params():
                     Unknown parameter '%s'.

     parse():
             Bad length of MARC 008 field.
                     Length: %s

             Errors from L&lt;Data::MARC::Field008&gt;, see documentation.

     serialize():
             Bad 'Data::MARC::Field008' instance to serialize.

EXAMPLE1
     use strict;
     use warnings;

     use MARC::Field008;
     use MARC::Leader;
     use Data::Printer;

     # Object.
     my $leader = MARC::Leader-&gt;new-&gt;parse('     nam a22        4500');
     my $obj = MARC::Field008-&gt;new(
             'leader' =&gt; $leader,
     );

     # Parse.
     my $data = $obj-&gt;parse('830304s1982    xr a         u0|0 | cze  ');

     # Dump.
     p $data;

     # Output:
     # Data::MARC::Field008  {
     #     parents: Mo::Object
     #     public methods (13):
     #         BUILD
     #         Data::MARC::Field008::Utils:
     #             check_cataloging_source, check_date, check_modified_record, check_type_of_date
     #         Error::Pure:
     #             err
     #         Error::Pure::Utils:
     #             err_get
     #         Mo::utils:
     #             check_isa, check_length_fix, check_number, check_required, check_strings
     #         Readonly:
     #             Readonly
     #     private methods (0)
     #     internals: {
     #         cataloging_source      " ",
     #         date_entered_on_file   830304,
     #         date1                  1982,
     #         date2                  "    ",
     #         language               "cze",
     #         material               Data::MARC::Field008::Book,
     #         material_type          "book",
     #         modified_record        " ",
     #         place_of_publication   "xr ",
     #         raw                    "830304s1982    xr a         u0|0 | cze  " (dualvar: 830304),
     #         type_of_date           "s"
     #     }
     # }

EXAMPLE2
     use strict;
     use warnings;

     use MARC::Field008;
     use MARC::Leader;
     use Data::MARC::Field008;
     use Data::MARC::Field008::Book;

     # Object.
     my $leader = MARC::Leader-&gt;new-&gt;parse('     nam a22        4500');
     my $obj = MARC::Field008-&gt;new(
             'leader' =&gt; $leader,
     );

     # Data.
     my $material = Data::MARC::Field008::Book-&gt;new(
             'biography' =&gt; ' ',
             'conference_publication' =&gt; '0',
             'festschrift' =&gt; '0',
             'form_of_item' =&gt; 'r',
             'government_publication' =&gt; ' ',
             'illustrations' =&gt; '    ',
             'index' =&gt; '0',
             'literary_form' =&gt; '0',
             'nature_of_content' =&gt; '    ',
             'target_audience' =&gt; ' ',
     );
     my $data = Data::MARC::Field008-&gt;new(
             'cataloging_source' =&gt; ' ',
             'date_entered_on_file' =&gt; '      ',
             'date1' =&gt; '    ',
             'date2' =&gt; '    ',
             'language' =&gt; 'cze',
             'material' =&gt; $material,
             'material_type' =&gt; 'book',
             'modified_record' =&gt; ' ',
             'place_of_publication' =&gt; '   ',
             'type_of_date' =&gt; 's',
     );

     # Serialize.
     print "'".$obj-&gt;serialize($data)."'\n";

     # Output:
     # '      s                r     000 0 cze  '

DEPENDENCIES
    Class::Utils, Data::MARC::Field008, Data::MARC::Field008::Book,
    Data::MARC::Field008::ComputerFile,
    Data::MARC::Field008::ContinuingResource, Data::MARC::Field008::Map,
    Data::MARC::Field008::MixedMaterial, Data::MARC::Field008::Music,
    Data::MARC::Field008::VisualMaterial, Error::Pure, List::Util,
    Mo::utils, Scalar::Util.

SEE ALSO
    Data::MARC::Field008
        Data object for MARC field 008.

REPOSITORY
    &lt;https://github.com/michal-josef-spacek/MARC-Field008&gt;

AUTHOR
    Michal Josef �麖a�嶤k &lt;mailto:skim@cpan.org&gt;

    &lt;http://skim.cz&gt;

LICENSE AND COPYRIGHT
    穢 2025 Michal Josef �麖a�嶤k

    BSD 2-Clause License

VERSION
    0.02

</pre></body></html>