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.
Config::Backend::String
Config::Frontend
new(\$strref) --> Config::Backend::String
If called with a reference to a string, will instantiate a Config::Backend::String object. Otherwise will attempt to die.
set(var,val) --> void
This 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.
var
get(var) --> string
Returns undef, if var does not exist. Returns the value of var (string), otherwise.
undef
del(var) --> void
Delets var from the string.
variables() --> list
Will 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.
To install Config::Frontend, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Config::Frontend
CPAN shell
perl -MCPAN -e shell install Config::Frontend
For more information on module installation, please visit the detailed CPAN module installation guide.