projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2996f70
)
Use do instead of eval, as it is faster.
author
Jamie Cameron
<jcameron@webmin.com>
Mon, 7 Dec 2009 04:39:18 +0000
(20:39 -0800)
committer
Jamie Cameron
<jcameron@webmin.com>
Mon, 7 Dec 2009 04:39:18 +0000
(20:39 -0800)
package-updates/package-updates-lib.pl
patch
|
blob
|
history
diff --git
a/package-updates/package-updates-lib.pl
b/package-updates/package-updates-lib.pl
index
0df1bd8
..
078c19f
100644
(file)
--- a/
package-updates/package-updates-lib.pl
+++ b/
package-updates/package-updates-lib.pl
@@
-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)