NAME
App::MARC::Leader - Base class for marc-leader script.
SYNOPSIS
use App::MARC::Leader;
my $app = App::MARC::Leader->new;
my $exit_code = $app->run;
METHODS
new
my $app = App::MARC::Leader->new;
Constructor.
Returns instance of object.
run
my $exit_code = $app->run;
Run.
Returns 1 for error, 0 for success.
ERRORS
new():
From Class::Utils::set_params():
Unknown parameter '%s'.
EXAMPLE1
use strict;
use warnings;
use App::MARC::Leader;
use IO::Barf qw(barf);
use File::Temp qw(tempfile);
use MIME::Base64;
# Content.
my $marc_xml_example = <<'END';
PD94bWwgdmVyc2lvbiA9ICIxLjAiIGVuY29kaW5nID0gIlVURi04Ij8+Cjxjb2xsZWN0aW9uIHht
bG5zPSJodHRwOi8vd3d3LmxvYy5nb3YvTUFSQzIxL3NsaW0iIHhtbG5zOnhzaT0iaHR0cDovL3d3
dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhzaTpzY2hlbWFMb2NhdGlvbj0iaHR0
cDovL3d3dy5sb2MuZ292L01BUkMyMS9zbGltIGh0dHA6Ly93d3cubG9jLmdvdi9zdGFuZGFyZHMv
bWFyY3htbC9zY2hlbWEvTUFSQzIxc2xpbS54c2QiPgogIDxyZWNvcmQgeG1sbnM9Imh0dHA6Ly93
d3cubG9jLmdvdi9NQVJDMjEvc2xpbSIgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAx
L1hNTFNjaGVtYS1pbnN0YW5jZSIgeHNpOnNjaGVtYUxvY2F0aW9uPSJodHRwOi8vd3d3LmxvYy5n
b3YvTUFSQzIxL3NsaW0gaHR0cDovL3d3dy5sb2MuZ292L3N0YW5kYXJkcy9tYXJjeG1sL3NjaGVt
YS9NQVJDMjFzbGltLnhzZCI+CiAgICA8bGVhZGVyPiAgICAgbmFtIGEyMiAgICAgICAgNDUwMDwv
bGVhZGVyPgogICAgPGNvbnRyb2xmaWVsZCB0YWc9IjAwMSI+Y2s4MzAwMDc4PC9jb250cm9sZmll
bGQ+Ci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PlZ5c29rw6EgxaFrb2xhIGVrb25v
bWlja8OhIHYgUHJhemU8L3N1YmZpZWxkPgogICAgICA8c3ViZmllbGQgY29kZT0iNyI+a24yMDAx
MDcwOTQwMzwvc3ViZmllbGQ+CiAgICA8L2RhdGFmaWVsZD4KICAgIDxkYXRhZmllbGQgdGFnPSI5
OTgiIGluZDE9IiAiIGluZDI9IiAiPgogICAgICA8c3ViZmllbGQgY29kZT0iYSI+aHR0cDovL2Fs
ZXBoLm5rcC5jei9GLz9mdW5jPWRpcmVjdCZhbXA7ZG9jX251bWJlcj0wMDAwMDAwOTYmYW1wO2xv
Y2FsX2Jhc2U9Q05CPC9zdWJmaWVsZD4KICAgIDwvZGF0YWZpZWxkPgogIDwvcmVjb3JkPgo8L2Nv
bGxlY3Rpb24+Cg==
END
my (undef, $temp_file) = tempfile();
barf($temp_file, decode_base64($marc_xml_example));
# Arguments.
@ARGV = (
'-f',
$temp_file,
);
# Run.
exit App::MARC::Leader->new->run;
# Output (ANSI colors are used with set COLOR env variable):
# Record length: 0
# Record status: New
# Type of record: Language 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: 0
# Encoding level: Full level
# Descriptive cataloging form: Non-ISBD
# 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
EXAMPLE2
use strict;
use warnings;
use App::MARC::Leader;
use IO::Barf qw(barf);
use File::Temp qw(tempfile);
use MIME::Base64;
# Content.
my $marc_xml_example = <<'END';
PD94bWwgdmVyc2lvbiA9ICIxLjAiIGVuY29kaW5nID0gIlVURi04Ij8+Cjxjb2xsZWN0aW9uIHht
bG5zPSJodHRwOi8vd3d3LmxvYy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vcmVjb3JkPgo8L2Nv
bGxlY3Rpb24+Cg==
END
my (undef, $temp_file) = tempfile();
barf($temp_file, decode_base64($marc_xml_example));
# Arguments.
@ARGV = (
'-a',
'-f',
$temp_file,
);
# Run.
exit App::MARC::Leader->new->run;
# Output:
# Record length: 0
# Record status: New
# Type of record: Language 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: 0
# Encoding level: Full level
# Descriptive cataloging form: Non-ISBD
# 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
DEPENDENCIES
Class::Utils, Getopt::Std, MARC::File::XML, MARC::Leader, MARC::Leader::Print.
REPOSITORY
https://github.com/michal-josef-spacek/App-MARC-Leader
AUTHOR
Michal Josef Špaček mailto:skim@cpan.org
LICENSE AND COPYRIGHT
© 2023-2024 Michal Josef Špaček
BSD 2-Clause License
VERSION
0.06