| Gantry documentation | Contained in the Gantry distribution. |
Gantry::Conf::Provider::HTTP::Config::General -- Uses Config::General to configure your Gantry application
use Gantry::Conf::Provider::HTTP::Config::General;
my $config_hash = Gantry::Conf::Provider::HTTP::Config::General->config($url);
This is the provider to allow Gantry::Conf to be able to handle Config::General aka Apache style configuration files received via the web.
Returns a conf subhash constructed by using Config::General on the result of an http(s) query.
Gantry(3), Gantry::Conf(3), Config::General(3)
Frank Wiles <frank@revsys.com>
Copyright (c) 2006, Revolution Systems, LLC.
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.
| Gantry documentation | Contained in the Gantry distribution. |
package Gantry::Conf::Provider::HTTP::Config::General; ##################################################################### # # Name : Gantry::Conf::Provider::FlatFile::Config::General; # Author : Frank Wiles <frank@revsys.com> # # Description : Gantry::Conf provider that allows the use of # Config::General config files. # ##################################################################### use strict; use warnings; use Carp qw(croak); use Config::General; use base qw( Gantry::Conf::Provider::HTTP ); #------------------------------------------------ # config #------------------------------------------------ # Configure ourself with a Config::General # config file #------------------------------------------------ sub config { my $self = shift; my $url = shift; my $page = $self->fetch( $url ); my $config = Config::General->new( -String => $page ) or croak "Unable to create Config::General object: $!"; my %confs = $config->getall; return( \%confs ); } # END config 1; __END__