projects
/
srvgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug 17600: Standardize our EXPORT_OK
[srvgit]
/
misc
/
check_sysprefs.pl
diff --git
a/misc/check_sysprefs.pl
b/misc/check_sysprefs.pl
index
d69ee15
..
aed792c
100755
(executable)
--- a/
misc/check_sysprefs.pl
+++ b/
misc/check_sysprefs.pl
@@
-8,8
+8,9
@@
use strict;
use warnings;
use strict;
use warnings;
-use File::Find;
+use File::Find
qw( find )
;
+use Koha::Script;
use C4::Context;
@ARGV = qw(.) unless @ARGV;
use C4::Context;
@ARGV = qw(.) unless @ARGV;
@@
-21,8
+22,8
@@
sub check_sys_pref {
if ( !-d _ ) {
my $name = $File::Find::name;
if ( $name =~ /(\.pl|\.pm)$/ ) {
if ( !-d _ ) {
my $name = $File::Find::name;
if ( $name =~ /(\.pl|\.pm)$/ ) {
- open(
FILE, "$_"
) || die "can't open $name";
- while ( my $inp = <
FILE
> ) {
+ open(
my $fh, '<', $_
) || die "can't open $name";
+ while ( my $inp = <
$fh
> ) {
if ( $inp =~ /C4::Context->preference\((.*?)\)/ ) {
my $variable = $1;
$variable =~ s /\'|\"//g;
if ( $inp =~ /C4::Context->preference\((.*?)\)/ ) {
my $variable = $1;
$variable =~ s /\'|\"//g;
@@
-36,7
+37,7
@@
sub check_sys_pref {
"$name has a reference to $variable, this does not exist in the database\n";
}
}
"$name has a reference to $variable, this does not exist in the database\n";
}
}
- close
FILE
;
+ close
$fh
;
}
}
$sth->finish();
}
}
$sth->finish();