Protect DBIC as best we can from the failure mode in 7cb35852
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / Sybase / FreeTDS.pm
index feb50fe..9db543c 100644 (file)
@@ -4,13 +4,13 @@ use strict;
 use warnings;
 use base qw/DBIx::Class::Storage::DBI::Sybase/;
 use mro 'c3';
-use Try::Tiny;
+use DBIx::Class::_Util 'dbic_internal_try';
 use namespace::clean;
 
 =head1 NAME
 
-DBIx::Class::Storage::DBI::Sybase - Base class for drivers using L<DBD::Sybase>
-over FreeTDS.
+DBIx::Class::Storage::DBI::Sybase::FreeTDS - Base class for drivers using
+DBD::Sybase over FreeTDS.
 
 =head1 DESCRIPTION
 
@@ -67,17 +67,17 @@ sub set_textsize {
   my $text_size =
     shift
       ||
-    try { $self->_dbic_cinnect_attributes->{LongReadLen} }
+    dbic_internal_try { $self->_dbic_connect_attributes->{LongReadLen} }
       ||
     32768; # the DBD::Sybase default
 
   $self->_dbh->do("SET TEXTSIZE $text_size");
 }
 
-sub _dbh_begin_work {
+sub _exec_txn_begin {
   my $self = shift;
 
-  if ($self->{_in_dbh_do}) {
+  if ($self->{_in_do_block}) {
     $self->_dbh->do('BEGIN TRAN');
   }
   else {
@@ -85,7 +85,7 @@ sub _dbh_begin_work {
   }
 }
 
-sub _dbh_commit {
+sub _exec_txn_commit {
   my $self = shift;
 
   my $dbh = $self->_dbh
@@ -94,7 +94,7 @@ sub _dbh_commit {
   $dbh->do('COMMIT');
 }
 
-sub _dbh_rollback {
+sub _exec_txn_rollback {
   my $self = shift;
 
   my $dbh  = $self->_dbh
@@ -103,14 +103,17 @@ sub _dbh_rollback {
   $dbh->do('ROLLBACK');
 }
 
-1;
-
-=head1 AUTHORS
+=head1 FURTHER QUESTIONS?
 
-See 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;