Config::Backend::String - String backend for Config::Frontend.


NAME

Config::Backend::String - String backend for Config::Frontend.


Synopsys

 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;


ABSTRACT

Config::Backend::String is a backend module for Config::Frontend.


Description

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.

get(var) --> string

Returns undef, if var does not exist. Returns the value of var (string), otherwise.

del(var) --> void

Delets var from the string.

variables() --> list

Will return a list of all variables in Conf::String.


SEE ALSO

Config::Backend::String, Config::Backend::SQL, Config::Backend::File, Config::Frontend.


AUTHOR

Hans Oesterholt-Dijkema, <oesterhol@cpan.org>


COPYRIGHT AND LICENSE

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.