fixing a few glitches
authorJames Fournie <jfournie@sitka.bclibraries.ca>
Wed, 14 Sep 2011 16:50:50 +0000 (09:50 -0700)
committerJames Fournie <jfournie@sitka.bclibraries.ca>
Wed, 14 Sep 2011 16:50:50 +0000 (09:50 -0700)
marc_export_custom/marc_export_custom
marc_export_custom/sitka_full_outlook.ini

index 1f6a0cc..2ae8389 100755 (executable)
@@ -393,6 +393,7 @@ sub add_bib_holdings {
 
                         $thisorg = $orgs{$circlib};
 
+
                         while( $thisorg ){
                             print STDERR "here.";
                             # load the local config from the .ini file for exclusions
@@ -403,7 +404,7 @@ sub add_bib_holdings {
                             next COPYMAP if( $localcfg->{'ExcludeEntireOrg'} );
 
                             # what follows are exclusion rules
-
+                    
                             # Excluded Flags
                             if($localcfg->{'Flags'}){
                                 # this little line is just forcing scalars into an array so we can 'use strict' with Config::Simple
@@ -415,13 +416,15 @@ sub add_bib_holdings {
                             }
                             # Excluded Circ Modifiers
                             if($localcfg->{'CircMods'}){
+                                my $circmod = $cp->circ_modifier || "";
                                 my @circmods = ( (ref($localcfg->{'CircMods'}) eq "ARRAY") ? @{$localcfg->{'CircMods'}} : ($localcfg->{'CircMods'}) );
-                                next COPYMAP if( grep { $_ eq $cp->circ_modifier } @circmods && @circmods);
+                                next COPYMAP if( grep { $_ eq $circmod } @circmods && @circmods);
                             }
                             # Inverse rule -- only include specified Circ Mods
                             if($localcfg->{'OnlyIncludeCircMods'}){
+                                my $circmod = $cp->circ_modifier || "";
                                 my @circmods = ( (ref($localcfg->{'CircMods'}) eq "ARRAY") ? @{$localcfg->{'CircMods'}} : ($localcfg->{'CircMods'}) );
-                                next COPYMAP unless( grep { $_ eq $cp->circ_modifier } @circmods && @circmods);
+                                next COPYMAP unless( grep { $_ eq $circmod } @circmods && @circmods);
                             }
                             # Excluded Copy Statuses
                             if($localcfg->{'Statuses'}){
@@ -462,6 +465,7 @@ sub add_bib_holdings {
                                 my $reg = $localcfg->{'OnlyIncludeCallNoRegex'};
                                 next COPYMAP unless( grep { $cn->label =~ m/($reg)/ } @callnoregex && @callnoregex);
                             }
+
                             # Trim call number to a float and exclude based on Dewey Range
                             if($localcfg->{'DeweyGT'} || $localcfg->{'DeweyLT'}){
                                 my $gt = $localcfg->{'DeweyGT'};
index 2a2be4d..5ae1d7a 100644 (file)
@@ -101,8 +101,8 @@ OnlyIncludeLocations=CRANBROOK,CRANBROOKJ
 
 [BRHSP]
 Locations=Juvenile Non-Fiction
-DeweyGT=332.02
-DeweyLT=346.7
+;DeweyGT=332.02
+;DeweyLT=346.7
 
 [BGSI]
 Locations=Books on CD,Books on audio-cassette,Music Cds,Reference,Videotape,DVD,Storage