summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/Varspaceval.pm9
1 files changed, 3 insertions, 6 deletions
diff --git a/common/Varspaceval.pm b/common/Varspaceval.pm
index 0da4393c..feef189d 100644
--- a/common/Varspaceval.pm
+++ b/common/Varspaceval.pm
@@ -19,10 +19,8 @@ use MDK::Common;
sub get {
my ($_self, $file) = @_;
my %l;
- open my $F, $file or return;
- local $_;
- while (<$F>) {
+ foreach (cat_($file)) {
my ($v, $val, $val2) =
/^\s* # leading space
@@ -46,10 +44,9 @@ sub commit {
my ($_self, $file, $hash) = @_;
my $output = "";
- if (open(my $F, $file)) {
- local $_;
+ if (-r $file) {
- while (<$F>) {
+ foreach (cat_($file)) {
my ($pre, $key, $eq, $val, $rest) = /(^\s*)(\w+)(\s*"*'*)([^'"\s]*)(.*)/x;
if (!defined $key) {