CPAN-SQLite
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/CPAN/SQLite/META.pm view on Meta::CPAN
$CPAN::FrontEnd->myprint("Done!\n");
return 1;
}
sub setup {
my $obj = CPAN::SQLite->new(setup => 1);
$obj->index() or die qq{CPAN::SQLite setup failed};
return;
}
sub update {
my $obj = CPAN::SQLite->new();
$obj->index() or die qq{CPAN::SQLite update failed};
return;
}
sub check {
my $obj = CPAN::SQLite->new();
my $db = File::Spec->catfile($obj->{'db_dir'}, $obj->{'db_name'});
my $dbh = DBI->connect("DBI:SQLite:$db", '', '', { 'RaiseError' => 0, 'PrintError' => 0, 'AutoCommit' => 1 });
if (my $sth = $dbh->prepare('SELECT status FROM info WHERE status = 1')) {
lib/CPAN/SQLite/Populate.pm view on Meta::CPAN
$sth->finish();
undef $sth;
$dbh->commit() or do {
$cdbi->db_error();
$self->{error_msg} = $cdbi->{error_msg};
return;
};
return 1;
}
sub update {
my $self = shift;
unless ($dbh) {
$self->{error_msg} = q{No db handle available};
return;
}
my $data = $self->{update};
my $cdbi = $self->{cdbi};
unless (has_hash_data($data)) {
$self->{info_msg} = q{No author data to update};
return;
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.471 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )