Open markstos opened 11 years ago
thanks the report. I'm another DBIx::Simple and DBIx::Connector fan ;)
I’ve never seen this error, because I dont call $dbh->disconnect()
to keep connection managing as DBIx::Connector's job.
but in some cases, need it though.
I noticed $dbh->disconntct()
should call DBI::db::disconnect()
directly
when using DBIx::Simple as a subclass.
Tests(added your above test) passed. How about this?
Any reason why there is not a 0.05 version with this? Trying to use DBIx::Connector and DBIx::Simple::Inject in an Mojolicious hypnotoad app :)
Database object no longer usable (because of DBIx::Simple=HASH(0x5e612e0)->disconnect at ...local/lib/perl5/DBIx/Simple/Inject.pm line 63)
DBIx::Simple::Connector is a cleaner design approach to integrating DBIx::Simple and DBIx::Connector. The author of DBIx::Simple has approved the general approach when creating DBIx::Simple::Connector, but has not get formally reviewed and released it, along with the minor updates to DBIx::Simple that it requires:
I don't have write access to https://rt.cpan.org/Public/Bug/Display.html?id=89258
But I think this is needed aswell:
diff -rN -u DBIx-Simple-1.35/MANIFEST DBIx-Simple-1.40/MANIFEST --- DBIx-Simple-1.35/MANIFEST 2007-11-11 01:10:33.000000000 +0100 +++ DBIx-Simple-1.40/MANIFEST 2013-11-25 15:26:19.968743073 +0100 @@ -7,6 +7,7 @@ t/sqlite.t t/swap.t lib/DBIx/Simple.pm +lib/DBIx/Simple/Connector.pm lib/DBIx/Simple/Examples.pod lib/DBIx/Simple/Comparison.pod lib/DBIx/Simple/Result/RowObject.pm diff -rN -u DBIx-Simple-1.35/META.yml DBIx-Simple-1.40/META.yml --- DBIx-Simple-1.35/META.yml 2011-01-04 23:58:25.000000000 +0100 +++ DBIx-Simple-1.40/META.yml 2013-11-25 15:26:38.329329293 +0100 @@ -1,6 +1,6 @@ --- #YAML:1.0 name: DBIx-Simple -version: 1.35 +version: 1.40 abstract: Very complete easy-to-use OO interface to DBI author: - Juerd Waalboer
What about this?
RootClass => 'DBIx::Simple::Inject',
Thanks for this module. I like the idea of it. I wanted to use it to combine the DBIx::Simple API with the auto-reconnection feature of DBIx::Connector. However, as my testing shows below, it doesn't work in all cases.
Adjust the $DSN to suit you, and then you'll see that when using DBIx::Simple::Inject, the connection doesn't recover from a disconnect:
done_testing; ~