if($localcfg->{$cfgparam}){
# this little line is just forcing scalars into an array so we can 'use strict' with Config::Simple
my @flags = ( (ref($localcfg->{$cfgparam}) eq "ARRAY") ? @{$localcfg->{$cfgparam}} : ($localcfg->{$cfgparam}));
- if( grep { $_ eq 'reference' } @flags && $cp->ref eq 't')
+ if(grep( { $_ eq 'reference' } @flags) && ($cp->ref eq 't'))
{ skipnote($bib->id,"Flags: reference"); next COPYMAP; }
- elsif( grep { $_ eq 'unholdable' } @flags && $cp->holdable eq 'f')
+ if(grep( { $_ eq 'unholdable' } @flags) && ($cp->holdable eq 'f'))
{ skipnote($bib->id,"Flags: unholdable"); next COPYMAP; }
- elsif( grep { $_ eq 'circulate' } @flags && $cp->circulate eq 'f')
+ if(grep( { $_ eq 'circulate' } @flags) && ($cp->circulate eq 'f'))
{ skipnote($bib->id,"Flags: circulate"); next COPYMAP; }
- elsif( grep { $_ eq 'hidden' } @flags && $cp->opac_visible eq 'f')
- { skipnote($bib->id,"Flags: hidden"); next COPYMAP; }
+ if(grep( { $_ eq 'hidden' } @flags) && ($cp->opac_visible eq 'f'))
+ { skipnote($bib->id,"Flags: hidden"); next COPYMAP; }
}
# Excluded Circ Modifiers
if($localcfg->{$cfgparam}){
my $circmod = $cp->circ_modifier || "";
my @circmods = ( (ref($localcfg->{$cfgparam}) eq "ARRAY") ? @{$localcfg->{$cfgparam}} : ($localcfg->{$cfgparam}) );
- if( grep { $_ eq $circmod } @circmods && @circmods)
+ if(grep( { $_ eq $circmod } @circmods) && @circmods)
{ skipnote($bib->id,$cfgparam); next COPYMAP; }
}
# Inverse rule -- only include specified Circ Mods
if($localcfg->{$cfgparam}){
my $circmod = $cp->circ_modifier || "";
my @circmods = ( (ref($localcfg->{$cfgparam}) eq "ARRAY") ? @{$localcfg->{$cfgparam}} : ($localcfg->{$cfgparam}) );
- unless( grep { $_ and $_ eq $circmod } @circmods && @circmods)
+ unless(grep( { $_ and $_ eq $circmod } @circmods) && @circmods)
{ skipnote($bib->id,$cfgparam); next COPYMAP; }
}
# Excluded Copy Statuses
$cfgparam = 'Statuses';
if($localcfg->{$cfgparam}){
my @statuses = ( (ref($localcfg->{$cfgparam}) eq "ARRAY") ? @{$localcfg->{$cfgparam}} : ($localcfg->{$cfgparam}) );
- if( grep { $_ eq $statuses{$cp->status}->name } @statuses && @statuses)
+ if(grep( { $_ eq $statuses{$cp->status}->name } @statuses) && @statuses)
{ skipnote($bib->id,$cfgparam); next COPYMAP; }
}
# Excluded Locations
$cfgparam = 'Locations';
if($localcfg->{$cfgparam}){
my @locations = ( (ref($localcfg->{$cfgparam}) eq "ARRAY") ? @{$localcfg->{$cfgparam}} : ($localcfg->{$cfgparam}) );
- if( grep { $_ eq $shelves{$cp->location}->name } @locations && @locations)
+ if(grep( { $_ eq $shelves{$cp->location}->name } @locations) && @locations)
{ skipnote($bib->id,$cfgparam); next COPYMAP; }
}
# Inverse rule - Only use the specified locations
$cfgparam = 'OnlyIncludeLocations';
if($localcfg->{$cfgparam}){
my @locations = ( (ref($localcfg->{$cfgparam}) eq "ARRAY") ? @{$localcfg->{$cfgparam}} : ($localcfg->{'Locations'}) );
- unless( grep { $_ eq $shelves{$cp->location}->name } @locations && @locations)
+ unless(grep( { $_ eq $shelves{$cp->location}->name } @locations) && @locations)
{ skipnote($bib->id,$cfgparam); next COPYMAP; }
}
# exclude based on a regex match to location names
if($localcfg->{$cfgparam}){
my @locregex = ( (ref($localcfg->{$cfgparam}) eq "ARRAY") ? @{$localcfg->{$cfgparam}} : ($localcfg->{$cfgparam}) );
my $reg = $localcfg->{$cfgparam};
- if( grep { $shelves{$cp->location}->name =~ m/($reg)/ } @locregex && @locregex)
+ if(grep( { $shelves{$cp->location}->name =~ m/($reg)/ } @locregex) && @locregex)
{ skipnote($bib->id,$cfgparam); next COPYMAP; }
}
# include based on a regex match to location names
if($localcfg->{$cfgparam}){
my @locregex = ( (ref($localcfg->{$cfgparam}) eq "ARRAY") ? @{$localcfg->{$cfgparam}} : ($localcfg->{$cfgparam}) );
my $reg = $localcfg->{$cfgparam};
- unless( grep { $shelves{$cp->location}->name =~ m/($reg)/ } @locregex && @locregex)
+ unless(grep( { $shelves{$cp->location}->name =~ m/($reg)/ } @locregex) && @locregex)
{ skipnote($bib->id,$cfgparam); next COPYMAP; }
}
# Exclude based on a callno regex
if($localcfg->{$cfgparam}){
my @callnoregex = ( (ref($localcfg->{$cfgparam}) eq "ARRAY") ? @{$localcfg->{$cfgparam}} : ($localcfg->{$cfgparam}) );
my $reg = $localcfg->{$cfgparam};
- if( grep { $cn->label =~ m/($reg)/ } @callnoregex && @callnoregex)
+ if(grep( { $cn->label =~ m/($reg)/ } @callnoregex) && @callnoregex)
{ skipnote($bib->id,$cfgparam); next COPYMAP; }
}
# Include based on a callno regex
if($localcfg->{$cfgparam}){
my @callnoregex = ( (ref($localcfg->{$cfgparam}) eq "ARRAY") ? @{$localcfg->{$cfgparam}} : ($localcfg->{$cfgparam}) );
my $reg = $localcfg->{$cfgparam};
- unless( grep { $cn->label =~ m/($reg)/ } @callnoregex && @callnoregex)
+ unless(grep( { $cn->label =~ m/($reg)/ } @callnoregex) && @callnoregex)
{ skipnote($bib->id,$cfgparam); next COPYMAP; }
}