|
Conf - Configuration module with flexible backends |
Conf - Configuration module with flexible backends
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;
This module can be used to put configuration items in.
It's build up by using a backend and an interface. The
interface is through the Conf module. A Conf object
is instantiated with a backend.
new(backend) --> ConfShould be called with a pre-instantiated backend.
Returns a Conf object.
set(var,val) --> voidSets a variable with value val in the backend.
get(var) --> voidReturns the value for var as stored in the backend.
variables() --> list of stored variablesReturns a list all variables stored in the backen.
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.
|
Conf - Configuration module with flexible backends |