MT::ConfigMgr - Movable Type configuration manager


    use MT::ConfigMgr;
    my $cfg = MT::ConfigMgr->instance;

        or die $cfg->errstr;


MT::ConfigMgr is a singleton class that manages the Movable Type configuration file (mt.cfg), allowing access to the config directives contained therin.



Returns the singleton MT::ConfigMgr object. Note that when you want the object, you should always call instance, never new; new will construct a new MT::ConfigMgr object, and that isn't what you want. You want the object that has already been initialized with the contents of mt.cfg. This initialization is done by MT::new.


Reads the config file at the path $file and initializes the $cfg object with the directives in that file. Returns true on success, undef otherwise; if an error occurs you can obtain the error message with $cfg->errstr.

$cfg->define($directive [, %arg ])

Defines the directive $directive as a valid configuration directive; you must define new configuration directives before you read the configuration file, or else the read will fail.


Returns boolean value indicating whether the configuration is set so that external users management feature in Movable Type Enterprise is turned on.


The following configuration directives are allowed in mt.cfg. To get the value of a directive, treat it as a method that you are calling on the $cfg object. For example:


To set the value of a directive, do the same as the above, but pass in a value to the method:


A list of valid configuration directives can be found in the CONFIGURATION SETTINGS section of the manual.


Please see the MT manpage for author, copyright, and license information.