#!/usr/bin/env perl

use strict;
use warnings;

use App::MARC::List;

our $VERSION = 0.07;

# Run.
exit App::MARC::List->new->run;

# Print version.
sub VERSION_MESSAGE {
	print $VERSION."\n";
	exit 0;
}

__END__

=pod

=encoding utf8

=head1 NAME

marc-list - Tool to get MARC leader of field/subfield unique list.

=head1 SYNOPSIS

 marc-list [-f] [-h] [--version] marc_xml_file field [subfield]

=head1 DESCRIPTION

Tool to fetch unique list of some field in MARC collection file.
It could filter leader, control and data fields.
There is possibility to add frequency for each item in list.

It supports MARC XML files now.

=head1 ARGUMENTS

=over 8

=item * C<-f>

Print frequency.

=item * C<-h>

Print help.

=item * C<--version>

Print version of script.

=item * C<marc_xml_file>

MARC XML file name.

=item * C<field>

MARC field.

Field number or 'leader' string.

=item * C<subfield>

MARC subfield.

It's optional. Not needed for control fields or leader.
Required for data fields.

=item * C<module_version>

=back

=head1 EXAMPLE1

 marc-lisr __MARC.xml__ leader

=head1 EXAMPLE2

 marc-list __MARC.xml__ 008

=head1 EXAMPLE3

 marc-list __MARC.xml__ 015 a

=head1 REPOSITORY

L<https://github.com/michal-josef-spacek/App-MARC-List>

=head1 AUTHOR

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

L<http://skim.cz>

=head1 LICENSE AND COPYRIGHT

© 2022-2025 Michal Josef Špaček

BSD 2-Clause License

=head1 VERSION

0.07

=cut
