App-MARC-Leader
view release on metacpan or search on metacpan
};
if (! getopts('adf:hl:v', $self->{'_opts'})
|| $self->{'_opts'}->{'h'}
|| (! $self->{'_opts'}->{'f'} && ! defined $marc_leader)) {
print STDERR "Usage: $0 [-a] [-d] [-f marc_xml_file] [-h] [-l lang_code] [-v] [--version] [leader_string]\n";
print STDERR "\t-a\t\t\tPrint with ANSI colors (or use NO_COLOR/COLOR env variables).\n";
print STDERR "\t-d\t\t\tDon't print description.\n";
print STDERR "\t-f marc_xml_file\tMARC XML file.\n";
print STDERR "\t-h\t\t\tPrint help.\n";
print STDERR "\t-l lang_code\t\tISO 639-1 language code (default is from locales).\n";
print STDERR "\t-v\t\t\tVerbose mode.\n";
print STDERR "\t--version\t\tPrint version.\n";
print STDERR "\t[leader_string]\t\tMARC Leader string.\n";
return 1;
}
if ($self->{'_opts'}->{'f'}) {
my $marc_file = MARC::File::XML->in($self->{'_opts'}->{'f'});
# XXX Check
$marc_leader = $marc_file->next->leader;
string.
* "-h"
Print help.
* "-l lang_code"
ISO 639-1 language code of output language.
Default value is from locales.
* "-v"
Verbose mode.
* "--version"
Print version of script.
* "[leader_string]"
bin/marc-leader view on Meta::CPAN
Use MARC XML file name to decode of leader instead of leader string.
=item * C<-h>
Print help.
=item * C<-l lang_code>
ISO 639-1 language code of output language.
Default value is from locales.
=item * C<-v>
Verbose mode.
=item * C<--version>
Print version of script.
=item * C<[leader_string]>
t/App-MARC-Leader/04-run.t view on Meta::CPAN
# XXX Hack for missing abs2rel on Windows.
if ($OSNAME eq 'MSWin32') {
$script =~ s/\\/\//msg;
}
my $help = <<"END";
Usage: $script [-a] [-d] [-f marc_xml_file] [-h] [-l lang_code] [-v] [--version] [leader_string]
-a Print with ANSI colors (or use NO_COLOR/COLOR env variables).
-d Don't print description.
-f marc_xml_file MARC XML file.
-h Print help.
-l lang_code ISO 639-1 language code (default is from locales).
-v Verbose mode.
--version Print version.
[leader_string] MARC Leader string.
END
return $help;
}
( run in 1.046 second using v1.01-cache-2.11-cpan-ceb78f64989 )