/[libdata-portal]/trunk/Portal.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/Portal.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 7 by dpavlin, Sun Mar 7 20:40:47 2004 UTC revision 8 by dpavlin, Sun Mar 7 20:57:54 2004 UTC
# Line 11  use Data::Dumper; Line 11  use Data::Dumper;
11    
12  use lib '..';  use lib '..';
13    
 my $dsn = 'Pg:dbname=libdata';  
 my ($user,$passwd) = ('dpavlin','');  
   
14  my @persistent_vars = qw(p ms s);  my @persistent_vars = qw(p ms s);
15    
16  # read global.conf configuration  # read global.conf configuration
17  my $cfg_global = new Config::IniFiles( -file => '../global.conf' ) || die "can't open 'global.conf'";  my $cfg_global = new Config::IniFiles( -file => '../global.conf' ) || die "can't open 'global.conf'";
18    
19  # configuration options from global.conf  # configuration options from global.conf
20  my $TEMPLATE_PATH = $cfg_global->val('webpac', 'template_html') || die "need template_html in global.conf, section webpac";  my $TEMPLATE_PATH = $cfg_global->val('portal', 'template_html') || die "need template_html in global.conf, section portal";
21  my $CHARSET = $cfg_global->val('webpac', 'charset') || 'ISO-8859-1';  my $CHARSET = $cfg_global->val('portal', 'charset') || 'ISO-8859-1';
22    my $dsn = $cfg_global->val('portal', 'dbi_dsn') || die "need dsn in global.conf, section portal";
23    my ($user,$passwd) = ($cfg_global->val('portal', 'dbi_user'), $cfg_global->val('portal', 'dbi_passwd'));
24    my $locale = $cfg_global->val('portal', 'locale') || 'C';
25    
26    
27  my $dbh = DBI->connect("DBI:$dsn",$user,$passwd, { RaiseError => 1 });  my $dbh = DBI->connect("DBI:".$dsn,$user,$passwd, { RaiseError => 1 });
28    
29  use POSIX qw(locale_h);  use POSIX qw(locale_h);
30  setlocale(LC_CTYPE, "hr_HR");  setlocale(LC_CTYPE, $locale);
31  use locale;  use locale;
32    
33  sub setup {  sub setup {

Legend:
Removed from v.7  
changed lines
  Added in v.8

  ViewVC Help
Powered by ViewVC 1.1.26