|
/home/cpanrun/depot/main/contrib-patched/perl/CPAN/src/Conf/blib/lib/Conf/String.pm |
Conf::String, a string backend for Conf.
use Conf; use Conf::String;
open my $in,"<conf.cfg"; my $string=<$in>; close $in;
my $cfg=new Conf(new Conf::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;
Conf::String is a backend module for Conf.
new(\$strref) --> Conf::StringIf called with a reference to a string, will instantiate a Conf::String object.
Otherwise will attempt to die.
set(var,val) --> voidThis method will set variable var to value <val>. All set methods will
immmidiately reset the value of the string that the object references to.
So, all changes through 'set' will be visibile immidiately to the
program environment.
get(var) --> stringReturns undef, if var does not exist.
Returns the value of var (string), otherwise.
variables() --> listWill return a list of all variables in Conf::String.
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.
|
/home/cpanrun/depot/main/contrib-patched/perl/CPAN/src/Conf/blib/lib/Conf/String.pm |