Gantry::Conf(3)

NAME
Gantry::Conf - Gantry's Flexible Configuration System

SYNOPSIS
  use Gantry::Conf;

  # Retrieve a simple instance
  my $conf = Gantry::Conf->retrieve( { instance => 'foo' } );

  # Retrieve an instance from an alternate configuration file
  # other than /etc/gantry.conf
  my $conf2 = Gantry::Conf->retrieve({
          instance    => 'special',
          config_file => '/etc/special.conf'
  });

DESCRIPTION
Gantry::Conf is a configuration abstraction interface. While a part of the Gantry Framework, it can be used alone, as it does not require any other portions of Gantry.

It is used to allow an application to bootstrap it's own configuration with very little information. In most cases, the only information that an application needs to know in order to bootstrap itself is the name of its instance. This instance name could be hard coded into the application, but we strongly recommend using something more flexible.

If you are new to Gantry::Conf see the "Gantry::Conf::Tutorial" and the "Gantry::Conf::FAQ" for more information.

METHODS

new This constructor is for internal use. Call retrieve instead.

retrieve( $options_hash )
    The retrieve method is the only method your application should call. It takes a hash of arguments. All other methods defined in this module are considered internal and their interfaces may change at any time, you have been warned. The possible arguments are:

    instance => 'foo'
        This is the unique name of the "instance" of this application. This is typically the only option given to retrieve() and is what is used to bootstrap the rest of the configuration process. This "instance" name must match an entry in the configuration file.

    config_file => '/path/to/file.conf'
        By default Gantry::Conf looks at the file /etc/gantry.conf for its bootstrapping information. This option allows you to override this default behavior and have the system reference any file you desire. Note the file still must conform to the syntax of the main gantry.conf.

SEE ALSO
Gantry(3), Gantry::Conf::Tutorial(3), Ganty::Conf::FAQ(3)

LIMITATIONS
Currently this system only works on Unix-like systems.

AUTHOR
Frank Wiles <frank@revsys.com>

COPYRIGHT and LICENSE
Copyright (c) 2006, Frank Wiles.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.