Wrapper/SQLite.pm untested

filter: Statementstmt 0.0% 0 / 23 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 30 CC 2 SCAR 12.8
CC
2
Cov
0%
GetTableNames
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.6
1 package Database::Wrapper::SQLite;
2  
3 use strict;
4 use lib qw(../..);
5 use base qw(Database::Wrapper);
6  
7 our $VERSION = "1.04";
8 # $Id: SQLite.pm,v 1.2 2005/11/26 00:37:34 incorpoc Exp $
9  
10 sub GetTableNames($)
11 {
12 my ($self) = (shift);
13  
14 my $sth = undef;
15 eval
16 {
17 $sth = $self->{dbh}->prepare(qq(select tbl_name from sqlite_master;));
18 $sth->execute();
19 };
20 if($@)
21 {
22 return undef;
23 }
24  
25 my $raaTables = $sth->fetchall_arrayref();
26  
27 my $raTables = [];
28 foreach my $raTable (@$raaTables)
29 {
30 push @$raTables, $raTable->[0];
31 }
32  
33 return $raTables;
34 }
35  
36 1;
37  
38 __END__