Ignore:
Timestamp:
Dec 14, 2004, 6:46:00 PM (17 years ago)
Author:
kake
Message:

Encapsulate config data in OpenGuides::Config.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/OpenGuides/Build.pm

    r586 r587  
    33use strict;
    44use Module::Build;
     5use OpenGuides::Config;
    56use base 'Module::Build';
    67
     
    1314    die "Config::Tiny is required to set up this application.\n" if $@;
    1415
    15     my $config = Config::Tiny->read("wiki.conf");
     16    my $config = OpenGuides::Config->new( file => "wiki.conf" );
    1617
    1718    # Initialise the database if necessary.
    18     my $dbname = $config->{_}->{dbname};
    19     my $dbuser = $config->{_}->{dbuser};
    20     my $dbpass = $config->{_}->{dbpass};
    21     my $dbhost = $config->{_}->{dbhost};
    22     my $dbtype = $config->{_}->{dbtype};
     19    my $dbname = $config->dbname;
     20    my $dbuser = $config->dbuser;
     21    my $dbpass = $config->dbpass;
     22    my $dbhost = $config->dbhost;
     23    my $dbtype = $config->dbtype;
    2324
    2425    my %cgi_wiki_exts = ( postgres => "Pg",
     
    5152    die "Config::Tiny is required to set up this application.\n" if $@;
    5253
    53     my $config = Config::Tiny->read("wiki.conf");
     54    my $config = OpenGuides::Config->new( file => "wiki.conf" );
    5455
    5556    # Install the scripts where we were told to.
    56     my $install_directory    = $config->{_}->{install_directory};
    57     my $script_name          = $config->{_}->{script_name};
    58     my $template_path        = $config->{_}->{template_path};
    59     my $custom_template_path = $config->{_}->{custom_template_path};
    60     my $custom_lib_path      = $config->{_}->{custom_lib_path};
     57    my $install_directory    = $config->install_directory;
     58    my $script_name          = $config->script_name;
     59    my $template_path        = $config->template_path;
     60    my $custom_template_path = $config->custom_template_path;
     61    my $custom_lib_path      = $config->custom_lib_path;
    6162    my @extra_scripts        = @{ $self->{config}{__extra_scripts} };
    6263    my @templates            = @{ $self->{config}{__templates} };
Note: See TracChangeset for help on using the changeset viewer.