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