# on a standard install, /cgi-bin need to be added.
# test one, then the other
my $cgidir = C4::Context->config('intranetdir') . "/cgi-bin";
- unless ( opendir( DIR, "$cgidir/cataloguing/value_builder" ) ) {
+ my $dir_h;
+ unless ( opendir( $dir_h, "$cgidir/cataloguing/value_builder" ) ) {
$cgidir = C4::Context->config('intranetdir');
- opendir( DIR, "$cgidir/cataloguing/value_builder" )
+ opendir( $dir_h, "$cgidir/cataloguing/value_builder" )
|| die "can't opendir $cgidir/value_builder: $!";
}
- while ( my $line = readdir(DIR) ) {
+ while ( my $line = readdir($dir_h) ) {
if ( $line =~ /\.pl$/ &&
$line !~ /EXAMPLE\.pl$/ ) { # documentation purposes
push( @value_builder, $line );
}
}
@value_builder= sort {$a cmp $b} @value_builder;
- closedir DIR;
+ closedir $dir_h;
# build values list
my $mss = Koha::MarcSubfieldStructures->search(