mirror of
https://github.com/webmin/webmin.git
synced 2025-08-01 07:22:48 +00:00
Use do instead of eval, as it is faster.
This commit is contained in:
@ -149,10 +149,11 @@ my ($file, $arr) = @_;
|
||||
sub read_cache_file
|
||||
{
|
||||
my ($file) = @_;
|
||||
my $dump = &read_file_contents($file);
|
||||
return () if (!$dump);
|
||||
my $arr = eval $dump;
|
||||
return @$arr;
|
||||
if (-r $file) {
|
||||
do $file;
|
||||
return @$VAR1;
|
||||
}
|
||||
return ( );
|
||||
}
|
||||
|
||||
# compare_versions(&pkg1, &pk2)
|
||||
|
Reference in New Issue
Block a user