|
/Users/cpanrun/depot/main/contrib-patched/perl/CPAN/src/Conf/blib/lib/Conf/File.pm |
new(filename) -> Conf::FileDESTROY()set(var,value) -> voidget(var) -> stringvariables() -> list of strings
Conf::File, a file backend for Conf.
Conf::File is a file backend for Conf. It handles files with identifiers that are assigned values. The files can have comments.
Each call set() will immediately result in file to
be rewritten.
The configuration file has following syntax:
%# Head of the configuration file %variable=value %variable=mult line value with %% double percentage sign at the beginning of the line % indicating %%# (This is not a comment) a single escaped percentage sign. %# Comments start with %#.
new(filename) --> Conf::FileInvoked with a valid filename, new will open the filename for reading and read in the configuration items. A configuration file will have the following form:
%var = value %multiline=Hi there, This is a multiline, with a hundred, %% (percent) read back. %test=1000.0
Notice that the percentage sign in a multiline config item will be doubled to distinguish it from config variables.
DESTROY()This function will write back the configuration to file.
set(var,value) --> voidSets config key var to value. Writes the config file right away.
get(var) --> stringReads var from config. Returns undef, if var does not
exist. Returns the value of configuration item var,
otherwise.
variables() --> list of stringsReturns all variables in the configuraton file.
Conf::String , Conf::SQL , Conf::File .
Hans Oesterholt-Dijkema, <oesterhol@cpan.org>
Copyright 2004 by Hans Oesterholt-Dijkema
This library is free software; you can redistribute it and/or modify it under LGPL.
|
/Users/cpanrun/depot/main/contrib-patched/perl/CPAN/src/Conf/blib/lib/Conf/File.pm |