Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parsing driver names from DSN when the middle part includes DBI attributes #99

Closed

Conversation

fgabolde
Copy link
Contributor

@fgabolde fgabolde commented Apr 1, 2016

According to parse_dsn, the middle part of a DSN may include DBI attributes. Currently the driver name extracted from a DSN includes everything up to the next colon, which makes DBIC think it is not supported.

@ribasushi
Copy link
Collaborator

Huh... I wasn't aware of this being a thing...

Hm hm hm, shouldn't this perhaps then simply be /^dbi:(\w*)/ in order to match what DBI is doing?

@fgabolde
Copy link
Contributor Author

fgabolde commented Apr 1, 2016

Huh... I wasn't aware of this being a thing...

I just found out today as well actually while looking up ways to pass a full DSN + username in a single env variable. I'm using DBI_USER for now.

Hm hm hm, shouldn't this perhaps then simply be /^dbi:(\w*)/ in order to match what DBI is doing?

Yeah, I completely forgot to check the DBI source while I was doing this. Ideally I guess DBI->parse_dsn should be used but that would set a strong requirement on DBI 1.43+.

Do you need me to fix this PR with the DBI regex?

@ribasushi
Copy link
Collaborator

Ideally I guess DBI->parse_dsn should be used but that would set a strong requirement on DBI 1.43+.

We already depend on 1.57+, but there is another concern of loading DBI.pm as late as possible, thus I will stick with a regex.

Do you need me to fix this PR with the DBI regex?

No need, I will take it from here. Thank you!

@ribasushi
Copy link
Collaborator

Applied as e432887, thank you!

@ribasushi ribasushi closed this Apr 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants