Summary | Package variables | Synopsis | Description | General documentation | Methods |
WebCvs | Raw content |
configure | No description | Code |
getSettings | No description | Code |
configure | description | prev | next | Top |
my ($self, $confDir) = @_; my $confFile = $confDir."/settings.conf"; if (-e $confFile) { open(FH, "<".$confFile) || return; # Ignore if can't read.}
my $currHash = undef; while (<FH>) { # Have to do split because of weird newline stuff.
foreach (split("\n")) { s/^\s+//; # Strip leading whitespace
s/\s+$//; # Strip trailing whitespace
s/^#.*//; # Strip comments.
m/^.+$/ or next; # Skip blank lines.
m/^\[\s*(.*?)\s*\]$/ and $currHash = $1; # New section?
$currHash and m/^(.*?)\s*=\s*(.*)$/ and $settings{$currHash}{$1}=$2; # Key=value
}
}
close(FH);
} } 1;
getSettings | description | prev | next | Top |
my ($self, $confDir) = @_; if($confDir) ## undefined expected from formatterI as it has no concept of conf dir}
{ $self->configure($confDir); } #return (exists $settings{$group}) ? %{$settings{$group}} : ();
return\% settings;
AUTHOR - Syed Haider, Richard Holland | Top |
CONTACT | Top |