1package DBIx::Class::Schema::Loader::DBI::ADO; 2 3use strict; 4use warnings; 5use base 'DBIx::Class::Schema::Loader::DBI'; 6use mro 'c3'; 7 8our $VERSION = '0.07033'; 9 10=head1 NAME 11 12DBIx::Class::Schema::Loader::DBI::ADO - L<DBD::ADO> proxy 13 14=head1 DESCRIPTION 15 16Reblesses into an C<::ADO::> class when connecting via L<DBD::ADO>. 17 18See L<DBIx::Class::Schema::Loader::Base> for usage information. 19 20=cut 21 22sub _rebless { 23 my $self = shift; 24 25 return if ref $self ne __PACKAGE__; 26 27 my $dbh = $self->schema->storage->dbh; 28 my $dbtype = eval { $dbh->get_info(17) }; 29 unless ( $@ ) { 30 # Translate the backend name into a perl identifier 31 $dbtype =~ s/\W/_/gi; 32 my $class = "DBIx::Class::Schema::Loader::DBI::ADO::${dbtype}"; 33 if ($self->load_optional_class($class) && !$self->isa($class)) { 34 bless $self, $class; 35 $self->_rebless; 36 } 37 } 38} 39 40sub _tables_list { 41 my ($self, $opts) = @_; 42 43 return $self->next::method($opts, undef, undef); 44} 45 46sub _filter_tables { 47 my $self = shift; 48 49 local $^W = 0; # turn off exception printing from Win32::OLE 50 51 $self->next::method(@_); 52} 53 54=head1 SEE ALSO 55 56L<DBIx::Class::Schema::Loader::DBI::ADO::Microsoft_SQL_Server>, 57L<DBIx::Class::Schema::Loader::DBI::ADO::MS_Jet>, 58L<DBIx::Class::Schema::Loader>, L<DBIx::Class::Schema::Loader::Base>, 59L<DBIx::Class::Schema::Loader::DBI> 60 61=head1 AUTHOR 62 63See L<DBIx::Class::Schema::Loader/AUTHOR> and L<DBIx::Class::Schema::Loader/CONTRIBUTORS>. 64 65=head1 LICENSE 66 67This library is free software; you can redistribute it and/or modify it under 68the same terms as Perl itself. 69 70=cut 71 721; 73