Ignore:
Timestamp:
Apr 24, 2003, 5:26:38 PM (19 years ago)
Author:
kake
Message:

Rejigged in preparation for supporting mysql and sqlite

File:
1 edited

Legend:

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

    r59 r60  
    55use base 'Module::Build';
    66
    7 eval "use Config::Tiny";
    8 die "Config::Tiny is required to configure this application.\n" if $@;
    9 
    10 eval "use CGI::Wiki::Setup::Pg";
    11 die "CGI::Wiki is required to set up this application.\n" if $@;
    12 
    13 my $config = Config::Tiny->read("wiki.conf");
    14 my $dbname = $config->{_}->{dbname};
    15 my $dbuser = $config->{_}->{dbuser};
    16 my $dbpass = $config->{_}->{dbpass};
    17 my $dbhost = $config->{_}->{dbhost};
    18 
    197sub ACTION_install {
    208    my $self = shift;
    219    $self->SUPER::ACTION_install;
     10
     11    eval "use Config::Tiny";
     12    die "Config::Tiny is required to set up this application.\n" if $@;
     13
     14    eval "use CGI::Wiki::Setup::Pg";
     15    die "CGI::Wiki is required to set up this application.\n" if $@;
     16
     17    my $config = Config::Tiny->read("wiki.conf");
     18    my $dbname = $config->{_}->{dbname};
     19    my $dbuser = $config->{_}->{dbuser};
     20    my $dbpass = $config->{_}->{dbpass};
     21    my $dbhost = $config->{_}->{dbhost};
     22
    2223    print "Checking database schema...\n";
    2324    CGI::Wiki::Setup::Pg::setup( $dbname, $dbuser, $dbpass, $dbhost );
Note: See TracChangeset for help on using the changeset viewer.