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.07049'; 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 _filter_tables { 41 my $self = shift; 42 43 local $^W = 0; # turn off exception printing from Win32::OLE 44 45 $self->next::method(@_); 46} 47 48=head1 SEE ALSO 49 50L<DBIx::Class::Schema::Loader::DBI::ADO::Microsoft_SQL_Server>, 51L<DBIx::Class::Schema::Loader::DBI::ADO::MS_Jet>, 52L<DBIx::Class::Schema::Loader>, L<DBIx::Class::Schema::Loader::Base>, 53L<DBIx::Class::Schema::Loader::DBI> 54 55=head1 AUTHORS 56 57See L<DBIx::Class::Schema::Loader/AUTHORS>. 58 59=head1 LICENSE 60 61This library is free software; you can redistribute it and/or modify it under 62the same terms as Perl itself. 63 64=cut 65 661; 67