From: Rafael Kitover Date: Thu, 4 Jun 2009 23:28:18 +0000 (+0000) Subject: set date format on _rebless correctly X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=683f73ec7158f046e8bbcccb45a9a7099f96dd28;p=dbsrgits%2FDBIx-Class-Historic.git set date format on _rebless correctly --- diff --git a/lib/DBIx/Class/Storage/DBI/Sybase.pm b/lib/DBIx/Class/Storage/DBI/Sybase.pm index b471275..385ac30 100644 --- a/lib/DBIx/Class/Storage/DBI/Sybase.pm +++ b/lib/DBIx/Class/Storage/DBI/Sybase.pm @@ -23,19 +23,29 @@ sub _rebless { if (!$exception && $dbtype && $self->load_optional_class($subclass)) { bless $self, $subclass; $self->_rebless; - } elsif (not $self->dbh->{syb_dynamic_supported}) { - bless $self, 'DBIx::Class::Storage:DBI::Sybase::NoBindVars'; - $self->_rebless; + } else { + # real Sybase + if (not $self->dbh->{syb_dynamic_supported}) { + bless $self, 'DBIx::Class::Storage:DBI::Sybase::NoBindVars'; + $self->_rebless; + } + $self->_init_date_fmt; } } } +sub _populate_dbh { + my $self = shift; + $self->next::method(@_); + $self->_init_date_fmt; + 1; +} + { my $old_dbd_warned = 0; - sub _populate_dbh { + sub _init_date_fmt { my $self = shift; - $self->next::method(@_); my $dbh = $self->_dbh; if ($dbh->can('syb_date_fmt')) {