bigpresh / Dancer-Plugin-Database

Dancer::Plugin::Database - easy database support for Dancer applications
http://search.cpan.org/dist/Dancer-Plugin-Database
37 stars 36 forks source link

If dsn is set and driver is not present in dancer config file we get and error in Database.pm #8

Closed mvickers closed 13 years ago

mvickers commented 13 years ago

Hi David,

I was using Dancer::Plugin::Database today with the Sybase driver and I set the dsn in the config file to what I wanted it to be. I then removed the driver, database, and host settings as the doco says but ran into trouble with Database.pm reading an uninitialized hash value around line 144.

This pull request fixes that issue, although you understand your code better than me and may find a better spot for it.

Cheers

Matt.

bigpresh commented 13 years ago

Excellent, thanks! I'll check this out tonight. Your pull request will certainly fix the warning nicely.

However, I'm thinking it would make sense for the code to extract the driver setting from the dsn passed, so that the automatic utf8 support would still work; I'll have a think :)

mvickers commented 13 years ago

I knew you'd have a better idea !. Thanks.

bigpresh commented 13 years ago

I've committed the change to my repo in 856af3caba3dbecb718a.

I'm waiting to see some CPAN testers results from the previous dev release last night, to reassure myself that the changes I've added for proper fork/thread-safety work well, then I'll get a new release out - 1.40 should be out tomorrow I'd expect.

Thanks for bringing this to my attention Matt, appreciated!

mvickers commented 13 years ago

No worries David, thanks for all your hard work, makes my job a lot easier !