|
Config::Backend::String - String backend for Config::Frontend. |
new(\$strref) -> Config::Backend::Stringset(var,val) -> voidget(var) -> stringdel(var) -> voidvariables() -> list
Config::Backend::String - String backend for Config::Frontend.
use Config::Frontend; use Config::Backend::String;
open my $in,"<conf.cfg"; my $string=<$in>; close $in;
my $cfg=new Config::Frontend(new Config::Backend::String(\$string))
print $cfg->get("config item 1");
$cfg->set("config item 1","Hi There!");
open my $out,">conf.cfg"; print $out $string; close $out;
Config::Backend::String is a backend module for Config::Frontend.
new(\$strref) --> Config::Backend::StringIf called with a reference to a string, will instantiate a Config::Backend::String
object. Otherwise will attempt to die.
set(var,val) --> voidThis method will set variable var to value <val>. All set methods will
immediately reset the value of the string that the object references to.
So, all changes through 'set' will be visibile imediately to the
program environment.
get(var) --> stringReturns undef, if var does not exist.
Returns the value of var (string), otherwise.
del(var) --> voidDelets var from the string.
variables() --> listWill return a list of all variables in Conf::String.
Config::Backend::String, Config::Backend::SQL, Config::Backend::File, Config::Frontend.
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.
|
Config::Backend::String - String backend for Config::Frontend. |