03 Aug 2001 11:47:05 UTC
- Distribution: Db-Mediasurface-ReadConfig
- Module version: 0.01
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (389 / 0 / 0)
- KwaliteeBus factor: 0
- 24.14% Coverage
- License: unknown
- Activity24 month
- Download (2.63KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionNWETTERS Nigel Wetters Gourlay
Db::Mediasurface::ReadConfig - reads, parses, and stores configuration from a Mediasurface ms.properties file.
This document refers to version 0.01 of DB::Mediasurface::ReadConfig, released August 3, 2001.
my $path = '/opt/ms/3.0.2/etc/ms.properties';
my $config = Db::Mediasurface::ReadConfig->new( path=>$path );
print('oracle user is '.$config->get_username."\n");
When supplied with a path to a Mediasurface configuration file (usually called ms.properties), this module loads the configuration details into an object, which can be interrogated at a later time.
- $config = Db::Mediasurface::ReadConfig->new( path=>$path );
This class method constructs a new configuration object by reading the file at location $path. This module assumes that the configuration file is constructed in the following manner...
Each key/value pair occurs on a single line, and the key and value are separated by an equals sign (=) and (optionally) white space. Any text on a line is ignored which follows a hash symbol (#).
- $value = $config->get_SOME_CONFIG_KEY;
Returns the value associated with a particular configuration key. If the key contained a full-stop in the config file, this is replaced by an underscore. For example, to get the value associated with jdbc.driver in the config file, use $config->get_jdbc_driver
Sets the value of a given key. Does not write the value back to the config file - no permanent damage is done ;)
Nigel Wetters (firstname.lastname@example.org)
Copyright (c) 2001, Nigel Wetters. All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.
Module Install Instructions
To install Db::Mediasurface::ReadConfig, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Db::Mediasurface::ReadConfig
For more information on module installation, please visit the detailed CPAN module installation guide.