use strict;
use warnings;
-use File::Find;
+use File::Find qw( find );
+use Koha::Script;
use C4::Context;
@ARGV = qw(.) unless @ARGV;
if ( !-d _ ) {
my $name = $File::Find::name;
if ( $name =~ /(\.pl|\.pm)$/ ) {
- open( FILE, "$_" ) || die "cant 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;
"$name has a reference to $variable, this does not exist in the database\n";
}
}
- close FILE;
+ close $fh;
}
}
$sth->finish();