Skip Menu |
 

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 50003
Status: resolved
Priority: 0/
Queue: DBIx-Class

People
Owner: Nobody in particular
Requestors: dhorne [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in:
  • 0.08111
  • 0.08112
Fixed in: 0.08113



Subject: on_connect_call not being invoked for existing handle
Download (untitled) / with headers
text/plain 579b
This code used to work with DBC 08109: ETL::Pipeline::Schema->connect( sub { $args->{dbh} }, {on_connect_do => $on_connect_do} ); However the on_connect_do doesn't seem to be invoked. However this works: ETL::Pipeline::Schema->connect( 'dbi:Oracle:', $user, $password, {RaiseError => 1}, {on_connect_do => $on_connect_do} ); I've tried on_connect_info to set our DateTime prefs and that doesn't work either. We've resolved temporarily by rolling DBIx::Class and SQL::Abstract back to 08109 and 1.56 respectively... but it'd be good to be on the latest and greatest....
Download (untitled) / with headers
text/plain 863b
On Thu Sep 24 19:13:14 2009, DHORNE wrote: Show quoted text
> This code used to work with DBC 08109: > > ETL::Pipeline::Schema->connect( > sub { $args->{dbh} }, > {on_connect_do => $on_connect_do} > ); > > > However the on_connect_do doesn't seem to be invoked. However this works: > > ETL::Pipeline::Schema->connect( > 'dbi:Oracle:', $user, $password, {RaiseError => 1}, > {on_connect_do => $on_connect_do} > ); > > I've tried on_connect_info to set our DateTime prefs and that doesn't > work either. We've resolved temporarily by rolling DBIx::Class and > SQL::Abstract back to 08109 and 1.56 respectively... but it'd be good to > be on the latest and greatest....
Are you sure about this? An extra test (no code changes) was committed that proves otherwise: http://dev.catalyst.perl.org/svnweb/bast/revision/?rev=7730 . I believe your invocation is identical right?
Download (untitled) / with headers
text/plain 718b
Show quoted text
> > Are you sure about this? An extra test (no code changes) was committed > that proves otherwise: > http://dev.catalyst.perl.org/svnweb/bast/revision/?rev=7730 . I believe > your invocation is identical right?
Ok, I've managed to figure out where this is a problem by knocking up a small test: my $schema = Schema->connect(sub { $dbh }, {on_connect_call => 'datetime_setup'}); my $date = $schema->storage->datetime_parser->format_datetime(DateTime->now); my $rs = $schema->resultset('Schema::DateTest')->single(1); For some reason, the call to format_datetime means that the on_connect_call or on_connect_do settings are ignored. This does not occur with 08109, however, but does occur with 08112.
Download (untitled) / with headers
text/plain 881b
On Tue Sep 29 17:36:27 2009, DHORNE wrote: Show quoted text
>
> > > > Are you sure about this? An extra test (no code changes) was committed > > that proves otherwise: > > http://dev.catalyst.perl.org/svnweb/bast/revision/?rev=7730 . I believe > > your invocation is identical right?
> > Ok, I've managed to figure out where this is a problem by knocking up a > small test: > > my $schema = > Schema->connect(sub { $dbh }, > {on_connect_call => 'datetime_setup'}); > > my $date = > $schema->storage->datetime_parser->format_datetime(DateTime->now); > > my $rs = $schema->resultset('Schema::DateTest')->single(1); > > For some reason, the call to format_datetime means that the > on_connect_call or on_connect_do settings are ignored. This does not > occur with 08109, however, but does occur with 08112. >
Indeed. Fixed in trunk, will be in the next release. Thanks for the report.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.