/Users/cpanrun/depot/main/contrib-patched/perl/CPAN/src/Class-ConfigMgr/blib/html/site/lib/Class/ConfigMgr.html


DESCRIPTION</pre> <p>Class::ConfigMgr is a base class for implementing a singleton object configuration manager. This module is based off of the configuration manager found in Movable Type and a limited subset of <a href=``../../../site/lib/AppConfig.html''>the AppConfig manpage</a> configuration files.</p> <p> </p> <hr /> <h1><a name=``methods''>METHOD/a</h1> <dl> <dt><strong><a name=``read_config'' class=``item''><code>read_config($file)</code></a></strong>

<dd> <p>Initializes the configuration manager by reads the configuration file specified by $file. Returns undefined if the configuration file could not be read. Use the <a href=``#errstr''><code>errstr</code></a> to retreive the error message. This method should only be called once and before any use of the <a href=``#instance''><code>instance</code></a> method.</p> </dd> </li> <dt><strong><a name=``instance'' class=``item''>instance</a></strong>

<dd> <p><a href=``#instance''><code>instance</code></a> returns a reference to the singleton object that is managing the configuration. As a singleton object, developers should <strong>ALWAY/strong call this method rather the call than <code>new</code>,</p> </dd> </li> <dt><strong><a name=``define'' class=``item''>define</a></strong>

<dd> <p>This method defines which directives are recognized by the application and optionally a default value if the directive is not explicted defined in the configuration file. <a href=``#define''><code>define</code></a> is most commonly used within the <a href=``#init''><code>init</code></a> method all subclasses must implement.</p> </dd> </li> <dt><strong><a name=``error'' class=``item''>error</a></strong>

<dd> <p>Captures an error message and return <a href=``../../../lib/pods/perlfunc.html#undef''><code>undef</code></a>. Inherited from <a href=``../../../site/lib/Class/ErrorHandler.html''>the Class::ErrorHandler manpage</a>.</p> </dd> </li> <dt><strong><a name=``errstr'' class=``item''>errstr</a></strong>

<dd> <p>Returns the last captured error message set by <a href=``#error''><code>error</code></a>. Inherited from <a href=``../../../site/lib/Class/ErrorHandler.html''>the Class::ErrorHandler manpage</a>.</p> </dd> </li> </dl> <p> </p> <hr /> <h1><a name=``subclassing''>SUBCLASSING</a></h1> <p>Subclassing Class::ConfigMgr is easy and only requires one method, <a href=``#init''><code>init</code></a>, to be implemented.</p> <dl> <dt><strong><a name=``init'' class=``item''>init</a></strong>

<dd> <p>All subclasses of Class::ConfigMgr must implement an <a href=``#init''><code>init</code></a> method that defines which directives are recognized and any associated default values. This method is automatically called by <a href=``#read_config''><code>read_config</code></a> before the actual configuration file is read. It is passed a reference to the singleton and the return value is ignored. See the example subclass in the <em>SYNOPSI/em.</p> </dd> </li> </dl> <p> </p> <hr /> <h1><a name=``dependencies''>DEPENDENCIE/a</h1> <p><a href=``../../../site/lib/Class/ErrorHandler.html''>the Class::ErrorHandler manpage</a></p> <p> </p> <hr /> <h1><a name=``license''>LICENS&LICENS;/a></h1> <p>The software is released under the Artistic License. The terms of the Artistic License are described at <a href=``http://www.perl.com/language/misc/Artistic.html''>http://www.perl.com/language/misc/Artistic.html.</p> <p> </p> <hr /> <h1><a name=``author___copyright''>AUTHOR &amp; COPYRIGHT</a></h1> <p>Except where otherwise noted, Class::ConfigMgr is Copyright 2005, Timothy Appnel, <a href=``mailto:tima@cpan.org.''>tima@cpan.org. All rights reserved.</p>

</body>

</html>

 /Users/cpanrun/depot/main/contrib-patched/perl/CPAN/src/Class-ConfigMgr/blib/html/site/lib/Class/ConfigMgr.html