DB/Nontransactional.pm

filter: Statementstmt 33.3% 1 / 3 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 1 / 1 Podpod n/a totaltotal 50.0% 2 / 4 CC 1 SCAR 2.6
CC
1
Cov
33%
BEGIN
1.3
CRAP 1.3
« DB/Table/View.pm ↑ Summary Machine/State.pm »
1 package Basset::DB::Nontransactional;
2  
3 #Basset::DB::Nontransactional 2004, 2006 James A Thomason III
4 #Basset::DB::Nontransactional is distributed under the terms of the Perl Artistic License.
5  
6 $VERSION = '1.02';
7  
8 =pod
9  
10 =head1 NAME
11  
12 Basset::DB::Nontransactional - A non transactional database driver.
13  
14 =head1 AUTHOR
15  
16 Jim Thomason, jim@jimandkoka.com
17  
18 =head1 SYNOPSIS
19  
20 If you really really really want to use non-transactional database drivers, just swap in
21 this driver in your conf file.
22  
23 types %= driver=Basset::DB::Nontransactional
24  
25 Voila! No transactions.
26  
27 =cut
28  
29 0 ▶use Basset::DB;
Subroutine BEGIN: called CC=1 SCAR=2.6
30 @ISA = qw(Basset::DB);
31  
32 use strict;
33 use warnings;
34  
35 sub create_handle {
36 return shift->SUPER::create_handle(
37 @_,
38 'AutoCommit' => 1
39 );
40 }
41  
42 #dummy out the Basset::DB methods that deal with transactions.
43  
44 sub stack { return 0 };
45 sub begin { return 1 };
46 sub end { return '0 but true' };
47 sub finish { return 1 };
48 sub fail { return 1 };
49 sub wipe { return 1 };
50 sub failed { return 0 };
51  
52 1;
« DB/Table/View.pm ↑ Summary Machine/State.pm »