]> git.imager.perl.org - bse.git/blame - lib/BSE/Install.pm
re-work installation to use a bse.cfg style file
[bse.git] / lib / BSE / Install.pm
CommitLineData
5bbf7309
TC
1package BSE::Install;
2use strict;
3use Exporter 'import';
4our @EXPORT_OK = qw(cfg util_dir cgi_dir public_html_dir templates_dir data_dir mysql_name perl);
5use lib 'site/cgi-bin/modules';
6use BSE::Cfg;
7
8our $VERSION = "1.000";
9
10my $conffile = $ENV{BSECONFIG} || 'install.cfg';
11
12my $cfg = BSE::Cfg->new
13 (
14 path => "site/cgi-bin",
15 extra_file => $conffile,
16 );
17
18sub cfg {
19 $cfg;
20}
21
22sub conffile {
23 $conffile;
24}
25
26sub util_dir {
27 $cfg->entryVar("paths", "util");
28}
29
30sub cgi_dir {
31 $cfg->entryVar("paths", "cgi-bin");
32}
33
34sub public_html_dir {
35 $cfg->entryVar("paths", "public_html");
36}
37
38sub templates_dir {
39 $cfg->entryVar("paths", "templates");
40}
41
42sub data_dir {
43 $cfg->entryVar("paths", "data");
44}
45
46sub mysql_name {
47 $cfg->entry("binaries", "mysql", "mysql");
48}
49
50sub perl {
51 $cfg->entry("paths", "perl", $^X);
52}
53
54sub db_dsn {
55 $cfg->entryErr("db", "dsn");
56}
57
58sub db_user {
59 $cfg->entryErr("db", "user");
60}
61
62sub db_password {
63 $cfg->entryErr("db", "password");
64}
65
661;