From bce1f8337a4f306a848319df8b11ebca76a4390b Mon Sep 17 00:00:00 2001 From: Shawn Boyette Date: Tue, 2 Sep 2008 15:12:27 +0000 Subject: [PATCH] bringing over renumber_marc argument processing changes (overrides to shortcuts) --- fingerprinter | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/fingerprinter b/fingerprinter index 3b7e0ef..424db25 100755 --- a/fingerprinter +++ b/fingerprinter @@ -285,19 +285,6 @@ sub initialize { # 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.fp'; - $c->{exception} = 'incoming.ex'; - } elsif ($c->{incumbent}) { - $c->{tag} = 901; - $c->{subfield} = 'c'; - $c->{output} = 'incumbent.fp'; - $c->{exception} = 'incumbent.ex'; - } - my $rc = GetOptions( $c, 'incoming', 'incumbent', @@ -312,6 +299,19 @@ sub initialize { show_help() unless $rc; show_help() if ($c->{help}); + # set defaults if told to do so + if ($c->{incoming}) { + $c->{tag} = 903 unless defined $c->{tag}; + $c->{subfield} = 'a' unless defined $c->{subfield}; + $c->{output} = 'incoming.fp' unless defined $c->{output}; + $c->{exception} = 'incoming.ex' unless defined $c->{exception}; + } elsif ($c->{incumbent}) { + $c->{tag} = 901 unless defined $c->{tag}; + $c->{subfield} = 'c' unless defined $c->{subfield}; + $c->{output} = 'incumbent.fp' unless defined $c->{output}; + $c->{exception} = 'incumbent.ex' unless defined $c->{exception}; + } + my @keys = keys %{$c}; show_help() unless (@ARGV and @keys); for my $key ('runtype', 'tag', 'subfield', 'output', 'exception') -- 1.7.2.5