DBIx-Simple
view release on metacpan or search on metacpan
lib/DBIx/Simple.pm view on Meta::CPAN
($self->{dbi_version} ||= DBI->VERSION) >= 1.38 or Carp::croak(
"DBI v1.38 required for last_insert_id" .
"--this is only $self->{dbi_version}, stopped"
);
return shift->{dbh}->last_insert_id(@_);
}
sub disconnect {
my ($self) = @_;
$self->_die(sprintf($err_cause, "$self->disconnect", (caller)[1, 2]));
return 1;
}
sub DESTROY {
my ($self) = @_;
$self->_die(sprintf($err_cause, "$self->DESTROY", (caller)[1, 2]));
}
### public methods wrapping SQL::Abstract
for my $method (qw/select insert update delete/) {
no strict 'refs';
*$method = sub {
my $self = shift;
return $self->query($self->abstract->$method(@_));
}
lib/DBIx/Simple.pm view on Meta::CPAN
($box ? $rule : ());
}
Carp::carp("Unknown type '$type'; using 'neat'") if $type ne 'neat';
return join '', map DBI::neat_list($_) . "\n", $self->arrays;
}
sub finish {
$_[0]->_die if ref $_[0]->{st} eq 'DBIx::Simple::DeadObject';
my ($self) = @_;
$self->_die(
sprintf($err_cause, "$self->finish", (caller)[1, 2])
);
}
sub DESTROY {
return if ref $_[0]->{st} eq 'DBIx::Simple::DeadObject';
my ($self) = @_;
$self->_die(
sprintf($err_cause, "$self->DESTROY", (caller)[1, 2])
);
}
1;
__END__
=head1 NAME
DBIx::Simple - Very complete easy-to-use OO interface to DBI
( run in 0.436 second using v1.01-cache-2.11-cpan-a3c8064c92c )