+2007-02-23 Christopher Faylor <me@cgf.cx>
+
+ * genini (get): Only quote $val when specific keys. Change embedded
+ quotes to apostophes.
+
2007-02-23 Christopher Faylor <me@cgf.cx>
Servaas Goossens <SGoossens@ortec.nl>
my $key = shift;
my $val = shift;
- if (substr($val, 0, 1) eq '"') {
+ if (substr($val, 0, 1) ne '"') {
+ $val = '"'. $val . '"' if $key eq 'ldesc' || $key eq 'sdesc';
+ } else {
while (length($val) == 1 || $val !~ /"$/os) {
$_ = <$FH>;
length or last;
$val .= "\n" . $_;
}
}
- if (($key eq 'ldesc' || $key eq 'sdesc') and $val !~ /"/o) {
- $pkg{$pname}{$what}{$key} = '"' . $val . '"';
- }
+ $val =~ s/(.)"(.)/$1'$2/mog;
return $val;
}
my $what;
$main::curfile = $f;
$. = 0;
- open(F, '<', $f) or die "$0: couldn't open $f - $!\n";
+ open(\*F, '<', $f) or die "$0: couldn't open $f - $!\n";
while (<F>) {
chomp;
s/#.*$//o;