| poest documentation | Contained in the poest distribution. |
POEST::Config::General - Configuration via Config::General
A poest configurator based on Config::General, a file based configuration.
The description of the configuration file is explained in Config::General. This configuration class conforms to the specification explained in POEST::Config.
Hostname localhost Port 2525 Plugin POEST::Plugin::General Plugin POEST::Plugin::Check::Hostname RequireHost Yes AllowedHost localhost AllowedHost example.com
If no configuration file is passed, a list of reasonable default
directories are checked for poest.conf.
/usr/local/etc /usr/local/etc/poest /etc/poest ./ ./etc ~/ ~/etc ~/.poest
Casey West, <casey@dyndns.org>
Copyright 2003 DynDNS.org
You may distribute this package under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file, with the exception that it may not be placed on physical media for distribution without the prior written approval of the author.
THIS PACKAGE IS PROVIDED WITH USEFULNESS IN MIND, BUT WITHOUT GUARANTEE OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. USE IT AT YOUR OWN RISK.
For more information, please visit http://opensource.dyndns.org
perl, POEST::Server, POEST::Config, Config::General.
| poest documentation | Contained in the poest distribution. |
# $Id: General.pm,v 1.2 2003/03/22 17:06:17 cwest Exp $ package POEST::Config::General;
use strict; $^W = 1; use vars qw[$VERSION]; $VERSION = (qw$Revision: 1.2 $)[1]; use Config::General; use base qw[POEST::Config]; use Carp; sub new { my ($class, %args) = @_; ATTEMPT: unless ( $args{ConfigFile} ) { my @locations = qw[ /usr/local/etc /usr/local/etc/poest /etc/poest ./ ./etc ~/ ~/etc ~/.poest ]; foreach ( @locations ) { if ( -e "$_/poest.conf" && -f _ && -s _ ) { $args{ConfigFile} = "$_/poest.conf"; last ATTEMPT; } } } croak 'ConfigFile is empty' unless $args{ConfigFile}; my $self = { ParseConfig( -ConfigFile => $args{ConfigFile}, -LowerCaseNames => 1, ) }; return bless $self, $class; } 1; __END__