/;
use mro 'c3';
use Scalar::Util 'reftype';
-use Try::Tiny;
+use DBIx::Class::_Util qw( dbic_internal_try dbic_internal_catch );
use DBIx::Class::Carp;
use namespace::clean;
=head1 DESCRIPTION
This class implements support specific to Microsoft SQL Server over ODBC. It is
-loaded automatically by by DBIx::Class::Storage::DBI::ODBC when it detects a
+loaded automatically by DBIx::Class::Storage::DBI::ODBC when it detects a
MSSQL back-end.
Most of the functionality is provided from the superclass
}
if (my ($data_source) = $dsn =~ /^dbi:ODBC:([\w-]+)\z/i) { # prefix with DSN
- warn "Bare DSN in ODBC connect string, rewriting as 'dsn=$data_source'"
+ carp_unique "Bare DSN in ODBC connect string, rewriting as 'dsn=$data_source'"
." for MARS\n";
$dsn = "dbi:ODBC:dsn=$data_source";
}
!!$self->_using_dynamic_cursors
) {
if ($use_dyncursors) {
- try {
+ dbic_internal_try {
my $dbh = $self->_dbh;
local $dbh->{RaiseError} = 1;
local $dbh->{PrintError} = 0;
$dbh->do('SELECT @@IDENTITY');
- } catch {
+ }
+ dbic_internal_catch {
$self->throw_exception (
'Your drivers do not seem to support dynamic cursors (odbc_cursortype => 2).'
. (
$self->_get_dbh->{odbc_SQL_ROWSET_SIZE} = $sql_rowset_size;
}
-1;
-
-=head1 AUTHOR
+=head1 FURTHER QUESTIONS?
-See L<DBIx::Class/AUTHOR> and L<DBIx::Class/CONTRIBUTORS>.
+Check the list of L<additional DBIC resources|DBIx::Class/GETTING HELP/SUPPORT>.
-=head1 LICENSE
+=head1 COPYRIGHT AND LICENSE
-You may distribute this code under the same terms as Perl itself.
+This module is free software L<copyright|DBIx::Class/COPYRIGHT AND LICENSE>
+by the L<DBIx::Class (DBIC) authors|DBIx::Class/AUTHORS>. You can
+redistribute it and/or modify it under the same terms as the
+L<DBIx::Class library|DBIx::Class/COPYRIGHT AND LICENSE>.
=cut
+
+1;
+
# vim:sw=2 sts=2 et