| GSM-SMS documentation | view source | Contained in the GSM-SMS distribution. |
GSM::SMS::Config - Implements a simple .ini style config.
Implements a simple configuration format. Used mainly for the transports config file.
The configuration format is defined as follows
^# := comment ^[.+]$ := start block ^.+=.+$ := var, value pair
The structure allows attribute (configuration) access as follows
$_preferences->{$blockname}->{$var}=$value
$blockname = ( 'default', <blocknames> }
my $cfg = GSM::SMS::Config->new(
-file => $config_file, # Optional otherwise take default config
-check => 1 # Optional, does a sanity check
);
$config->get_config( 'default' ); $config->get_config( 'Serial01' );
$value = $config->get_value($section, $name);
perl -MGSM::SMS::Config -egenerate_config
This method prints out a boilerplate config file starting from the settings in the default configuration.
Use this as a starting point to generate the configuration files for the examples.
This method implements a console based configuration script for the package. It will generate a site-wide config file that will be the default when instantiating a GSM::SMS::NBS class.
This method will ask you if you want to create a directory, and creates it.
Johan Van den Brande <johan@vandenbrande.com>
| GSM-SMS documentation | view source | Contained in the GSM-SMS distribution. |