| 1 | package DBIx::Class::TableNames; | ||
| 2 | use strict; | ||
| 3 | use warnings; | ||
| 4 | use base 'DBIx::Class'; | ||
| 5 | use Carp::Clan qw/^DBIx::Class/; | ||
| 6 | |||
| 7 | our $VERSION = '0.01'; | ||
| 8 | |||
| 9 | sub table_names { | ||
| 10 | my ($self, $key) = @_; | ||
| 11 | my @tables = $self->storage->dbh->tables(undef, undef, $key, 'TABLE'); | ||
| 12 | s/\Q`\E//g for @tables; s/\Q"\E//g for @tables;s/.+\.(.+)/$1/g for @tables; | ||
| 13 | return @tables; | ||
| 14 | } | ||
| 15 | |||
| 16 | 1; | ||
| 17 | |||
| 18 | __END__ |