Use do instead of eval, as it is faster.

This commit is contained in:
Jamie Cameron
2009-12-06 20:39:18 -08:00
parent 2996f70728
commit c782b8597b

View File

@ -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)