App-Milter-Limit-Plugin-SQLite

 view release on metacpan or  search on metacpan

lib/App/Milter/Limit/Plugin/SQLite.pm  view on Meta::CPAN


    # setup connection to the database.
    $self->_dbh($self->_new_dbh);

    unless ($self->_table_exists($self->table)) {
        $self->_create_table($self->table);
    }

    # make sure the db file has the right owner.
    my $uid = $self->config_get('global', 'user');
    my $gid = $self->config_get('global', 'group');

    if (defined $uid and defined $gid) {
        my $db_file = $self->db_file;
        chown $uid, $gid, $db_file or die "chown($db_file): $!";
    }
}

sub child_init {
    my $self = shift;

    debug("reopen db handle");

    if (my $dbh = $self->_dbh) {
        $dbh->disconnect;



( run in 2.072 seconds using v1.01-cache-2.11-cpan-ceb78f64989 )