From: Jason Stephenson Date: Thu, 29 Mar 2018 14:31:30 +0000 (-0400) Subject: LP1754455: Whitespace and indentation cleanup. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c9084e6214a190c9abf8d9a57cb112bd9f06cf73;p=working%2FEvergreen.git LP1754455: Whitespace and indentation cleanup. Signed-off-by: Jason Stephenson --- diff --git a/Open-ILS/src/support-scripts/marc_export.in b/Open-ILS/src/support-scripts/marc_export.in index f5761d54ec..576349c922 100755 --- a/Open-ILS/src/support-scripts/marc_export.in +++ b/Open-ILS/src/support-scripts/marc_export.in @@ -214,14 +214,13 @@ HELP foreach my $strip_value (@{$opts{strip}}) { my $trec = {}; if ($strip_value =~ /\//) { - $trec->{tag} = $`; - $trec->{tag} = "..." if ($` eq ""); - + $trec->{tag} = $`; + $trec->{tag} = "..." if ($` eq ""); $trec->{subfield} = $'; $trec->{subfield} = "." if ($' eq ""); } else { # No slash case - $trec->{tag} = $strip_value; + $trec->{tag} = $strip_value; $trec->{subfield} = ''; } push @strip, $trec; @@ -568,37 +567,35 @@ sub next { my $subfieldRE = $strip_ref->{subfield}; if ( $subfieldRE eq "") { - # Case 1: Field only check, e.g. "--strip 5.[0,1]" - # If the supplied regexp matches the field, then - # delete that field. - foreach my $test_field ($marc->fields()) { - if ($test_field->tag() =~ /$tagRE/) { - # A hit! - $marc->delete_field($test_field); - } - - } + # Case 1: Field only check, e.g. "--strip 5.[0,1]" + # If the supplied regexp matches the field, then + # delete that field. + foreach my $test_field ($marc->fields()) { + if ($test_field->tag() =~ /$tagRE/) { + # A hit! + $marc->delete_field($test_field); + } + } } elsif ($subfieldRE ne "" && $tagRE ne "") { # Case 2: Field & subfield supplied. # Note a blank tag will be wildcarded to "*". # Traverse fields, then traverse subfields if match # is found. - foreach my $test_field ($marc->fields()) { - if ( !$test_field->is_control_field() && - $test_field->tag() =~ /$tagRE/) { - # Traverse all subfields: - foreach my $test_subfield ($test_field->subfields()) { - my $sfcode = @{$test_subfield}[0]; - if ($sfcode =~ /$subfieldRE/) { - $test_field->delete_subfield($sfcode); - } - } - } - } - - } + foreach my $test_field ($marc->fields()) { + if ( !$test_field->is_control_field() && + $test_field->tag() =~ /$tagRE/) { + # Traverse all subfields: + foreach my $test_subfield ($test_field->subfields()) { + my $sfcode = @{$test_subfield}[0]; + if ($sfcode =~ /$subfieldRE/) { + $test_field->delete_subfield($sfcode); + } + } + } + } + } } - + if ($Marque::config->option_value('items')) { my @acps = $self->acps_for_bre($r); foreach my $acp (@acps) { @@ -973,36 +970,35 @@ sub next { my $subfieldRE = $strip_ref->{subfield}; if ( $subfieldRE eq "") { - # Case 1: Field only check, e.g. "--strip 5.[0,1]" - # If the supplied regexp matches the field, then - # delete that field. - foreach my $test_field ($marc->fields()) { - if ($test_field->tag() =~ /$tagRE/) { - # A hit! - $marc->delete_field($test_field); - } - - } + # Case 1: Field only check, e.g. "--strip 5.[0,1]" + # If the supplied regexp matches the field, then + # delete that field. + foreach my $test_field ($marc->fields()) { + if ($test_field->tag() =~ /$tagRE/) { + # A hit! + $marc->delete_field($test_field); + } + } } elsif ($subfieldRE ne "" && $tagRE ne "") { - # Case 2: Field & subfield supplied. - # Note a blank tag will be wildcarded to "*". - # Traverse fields, then traverse subfields if match - # is found. - foreach my $test_field ($marc->fields()) { + # Case 2: Field & subfield supplied. + # Note a blank tag will be wildcarded to "*". + # Traverse fields, then traverse subfields if match + # is found. + foreach my $test_field ($marc->fields()) { if ( !$test_field->is_control_field() && - $test_field->tag() =~ /$tagRE/) { + $test_field->tag() =~ /$tagRE/) { # Traverse all subfields: foreach my $test_subfield ($test_field->subfields()) { - my $sfcode = @{$test_subfield}[0]; - if ($sfcode =~ /$subfieldRE/) { + my $sfcode = @{$test_subfield}[0]; + if ($sfcode =~ /$subfieldRE/) { $test_field->delete_subfield($sfcode); - } + } } - } - } - + } + } } } + if ($Marque::config->option_value('since')) { my $leader = $marc->leader(); if ($U->is_true($r->deleted())) {