Wrapper/ODBC.pm untested

filter: Statementstmt 0.0% 0 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 23 CC 1 SCAR 6.9
CC
1
Cov
0%
GetTableNames
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Database::Wrapper::ODBC;
2
3 use strict;
4 use lib qw(../..);
5 use base qw(Database::Wrapper);
6
7 our $VERSION = "1.04";
8 # $Id: ODBC.pm,v 1.3 2005/11/26 00:37:34 incorpoc Exp $
9
10 =pod
11
12 Override the standard 'GetTableNames' as the Access driver
13 returns field names wrapped in backticks '`' preceded by the path, e.g.:
14
15 `C:\Temp\Foo`.`MSysAccessObjects`
16
17 =cut
18
19 sub GetTableNames($)
20 {
21 my ($self) = (shift);
22 my $raTables = $self->SUPER::GetTableNames();
23
24 grep {s/^\`[^\`]+\`\.//o} @$raTables;
25 # Strip leading and trailing backticks in place
26 grep {s/(^\`|\`$)//go} @$raTables;
27
28 return $raTables;
29 }
30
31 1;
32
33 __END__