# set mode on existing filehandles
binmode(STDIN, ':utf8');
+ # set defaults if told to do so
+ if ($c->{incoming}) {
+ $c->{tag} = 903;
+ $c->{subfield} = 'a';
+ $c->{output} = 'incoming.renumbered.marc.xml';
+ } elsif ($c->{incumbent}) {
+ $c->{tag} = 901;
+ $c->{subfield} = 'c';
+ $c->{output} = 'incumbent.renumbered.marc.xml';
+ }
+
my $rc = GetOptions( $c,
'incoming',
'incumbent',
show_help() unless $rc;
show_help() if ($c->{help});
- # set defaults if told to do so
- if ($c->{incoming}) {
- $c->{tag} = 903;
- $c->{subfield} = 'a';
- $c->{output} = 'incoming.renumbered.marc.xml';
- } elsif ($c->{incumbent}) {
- $c->{tag} = 901;
- $c->{subfield} = 'c';
- $c->{output} = 'incumbent.renumbered.marc.xml';
- }
-
my @keys = keys %{$c};
show_help() unless (@ARGV and @keys);
for my $key ('renumber-from', 'tag', 'subfield', 'output')
--tag=N -t Which tag to use
--subfield=X -s Which subfield to use
--output=<file> -o Output filename
-
Options
--incoming Set -t, -s, -o to incoming defaults
--incumbent Set -t, -s, -o to incumbent defaults