Games-Go-AGA-TDListDB
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Games/Go/AGA/TDListDB.pm view on Meta::CPAN
'INSERT OR IGNORE INTO ',
$self->table_name_meta,
' (',
'key, ',
'update_time, ',
'next_tmp_id',
' ) VALUES ( 1, 0, 1 )',
);
}
sub update_time {
my ($self, $new) = @_;
if (@_ > 1) {
$self->sth('update_time')->execute($new);
}
$self->sth('select_time')->execute();
my $time = $self->sth('select_time')->fetchall_arrayref();
$time = $time->[0][0];
return $time || 0;
}
t/001-TDList.t view on Meta::CPAN
sub fetch_player {
my ($last_name, $first_name) = @_;
$tdlistdb->sth('select_by_name')->execute($last_name, $first_name);
my $found = $tdlistdb->sth('select_by_name')->fetchall_arrayref;
croak("Too many copies of $last_name, $first_name\n") if (@{$found} > 1);
return $found->[0];
}
sub update_from_string {
my ($string) = @_;
my $ref = ref $string ? $string : \$string;
my $fh;
open($fh, '<', $ref)
or croak("Error opening \$string for reading: $!\n");
$tdlistdb->update_from_file($fh);
}
__END__
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.114 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )