Lemonldap-NG-Portal

 view release on metacpan or  search on metacpan

lib/Lemonldap/NG/Portal/Lib/DBI.pm  view on Meta::CPAN

    if ($@) {
        $self->{p}->logger->error("DBI connection error: $@");
        return 0;
    }

    if ( $conf->{dbiAuthChain} =~ /^dbi:sqlite/i ) {
        $self->{_dbh}->{sqlite_unicode} = 1;
    }
    elsif ( $conf->{dbiAuthChain} =~ /^dbi:mysql/i ) {
        eval {
            $self->{_dbh}->{mysql_enable_utf8} = 1;
            $self->{_dbh}->do("set names 'utf8'");
        };
    }
    elsif ( $conf->{dbiAuthChain} =~ /^dbi:pg/i ) {
        $self->{_dbh}->{pg_enable_utf8} = 1;
    }

    return $self->{_dbh};
}



( run in 0.262 second using v1.01-cache-2.11-cpan-00829025b61 )