<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    MARC::Leader - MARC leader class.

SYNOPSIS
     use MARC::Leader;

     my $obj = MARC::Leader-&gt;new(%params);
     my $leader_obj = $obj-&gt;parse($leader_str);
     my $leader_str = $obj-&gt;serialize($leader_obj);

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

    Constructor.

    Returns instance of object.

  "parse"
     my $leader_obj = $obj-&gt;parse($leader_str);

    Parse MARC leader string to object.

    Returns instance of 'Data::MARC::Leader' object.

  "serialize"
     my $leader_str = $obj-&gt;serialize($leader_obj);

    Serialize MARC leader object to string.

    Returns string.

ERRORS
     new():
             From Class::Utils::set_params():
                     Unknown parameter '%s'.

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

EXAMPLE1
     use strict;
     use warnings;

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

     if (@ARGV &lt; 1) {
             print "Usage: $0 marc_leader\n";
             exit 1;
     }
     my $marc_leader = $ARGV[0];

     # Object.
     my $obj = MARC::Leader-&gt;new;

     # Parse.
     my $leader_obj = $obj-&gt;parse($marc_leader);

     # Dump to output.
     p $leader_obj;

     # Output for '02200cem a2200541 i 4500':
     # Data::MARC::Leader  {
     #     parents: Mo::Object
     #     public methods (3):
     #         BUILD
     #         Mo::utils:
     #             check_strings
     #         Readonly:
     #             Readonly
     #     private methods (0)
     #     internals: {
     #         bibliographic_level               "m",
     #         char_coding_scheme                "a",
     #         data_base_addr                    541,
     #         descriptive_cataloging_form       "i",
     #         encoding_level                    " ",
     #         impl_def_portion_len              0,
     #         indicator_count                   2,
     #         length                            2200,
     #         length_of_field_portion_len       4,
     #         multipart_resource_record_level   " ",
     #         starting_char_pos_portion_len     5,
     #         status                            "c",
     #         subfield_code_count               2,
     #         type                              "e",
     #         type_of_control                   " ",
     #         undefined                         0
     #     }
     # }

EXAMPLE2
     use strict;
     use warnings;

     use MARC::Leader;
     use MARC::Leader::Print;

     if (@ARGV &lt; 1) {
             print "Usage: $0 marc_leader\n";
             exit 1;
     }
     my $marc_leader = $ARGV[0];

     # Object.
     my $obj = MARC::Leader-&gt;new;

     # Parse.
     my $leader_obj = $obj-&gt;parse($marc_leader);

     # Print to output.
     print scalar MARC::Leader::Print-&gt;new-&gt;print($leader_obj), "\n";

     # Output for '02200cem a2200541 i 4500':
     # Record length: 2200
     # Record status: Corrected or revised
     # Type of record: Cartographic material
     # Bibliographic level: Monograph/Item
     # Type of control: No specified type
     # Character coding scheme: UCS/Unicode
     # Indicator count: Number of character positions used for indicators
     # Subfield code count: Number of character positions used for a subfield code (2)
     # Base address of data: 541
     # Encoding level: Full level
     # Descriptive cataloging form: ISBD punctuation included
     # Multipart resource record level: Not specified or not applicable
     # Length of the length-of-field portion: Number of characters in the length-of-field portion of a Directory entry (4)
     # Length of the starting-character-position portion: Number of characters in the starting-character-position portion of a Directory entry (5)
     # Length of the implementation-defined portion: Number of characters in the implementation-defined portion of a Directory entry (0)
     # Undefined: Undefined

EXAMPLE3
     use strict;
     use warnings;

     use Data::MARC::Leader;
     use MARC::Leader;

     # Object.
     my $obj = MARC::Leader-&gt;new;

     # Data object.
     my $data_marc_leader = Data::MARC::Leader-&gt;new(
             'bibliographic_level' =&gt; 'm',
             'char_coding_scheme' =&gt; 'a',
             'data_base_addr' =&gt; 541,
             'descriptive_cataloging_form' =&gt; 'i',
             'encoding_level' =&gt; ' ',
             'impl_def_portion_len' =&gt; '0',
             'indicator_count' =&gt; '2',
             'length' =&gt; 2200,
             'length_of_field_portion_len' =&gt; '4',
             'multipart_resource_record_level' =&gt; ' ',
             'starting_char_pos_portion_len' =&gt; '5',
             'status' =&gt; 'c',
             'subfield_code_count' =&gt; '2',
             'type' =&gt; 'e',
             'type_of_control' =&gt; ' ',
             'undefined' =&gt; '0',
     );

     # Serialize.
     my $leader = $obj-&gt;serialize($data_marc_leader);

     # Print to output.
     print $leader."\n";

     # Output:
     # 02200cem a2200541 i 4500

DEPENDENCIES
    Class::Utils, Data::MARC::Leader, Error::Pure, Scalar::Util.

SEE ALSO
    Data::MARC::Leader
        Data object for MARC leader.

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

AUTHOR
    Michal Josef Ĺ&nbsp;paÄŤek &lt;mailto:skim@cpan.org&gt;

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

LICENSE AND COPYRIGHT
    Â© 2023 Michal Josef Ĺ&nbsp;paÄŤek

    BSD 2-Clause License

VERSION
    0.04

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