LP1754455: Whitespace and indentation cleanup.
authorJason Stephenson <jason@sigio.com>
Thu, 29 Mar 2018 14:31:30 +0000 (10:31 -0400)
committerJason Stephenson <jason@sigio.com>
Fri, 30 Mar 2018 00:33:02 +0000 (20:33 -0400)
Signed-off-by: Jason Stephenson <jason@sigio.com>
Open-ILS/src/support-scripts/marc_export.in

index f5761d5..576349c 100755 (executable)
@@ -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())) {