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
Case sensitivity in [deploy.variables] section #48
Comments
Oy, this is because Config::GitLike lowercases the keys. @alexmv, I wrote this method in a subclass to return all the key/value pairs in a section as a hash reference:
Works fine, except that |
Yeah, there should probably be a Config::GitLike flag as to if you care about case sensitivity. What you actually care about is case preservation, not case sensitivity, though, right? |
Yes, the key lookup should still be case-insensitive. I just want to be able to fetch the keys in their original case. I can't think of way to do it offhand that doesn't require duplication of some kind (e.g., a hash mapping the lowercase keys to the preserved case keys where they differ). |
And it would have to be post-merge, too. So if ~/config has |
Yeah, that's the only API I'm coming up with that's at all sensical. At a quick re-read of the code, I think it'd be vaguely irritating but not too bad to implement. I'm hosed too hosed to get to it myself this week, but can probably carve out some time next week. |
Oh, additional complication: multi-valued keys. If one files has |
As I said, whichever one wins. That is, the same one that has its value returned. |
I specified multi-valued keys, for which you get an array-ref back of all of the values set. I agree with you on non-multi-valued keys that the last one (which actually set the value) wins. |
Oh, multie-valued keys. Er, that’s a tough one. Maybe it causes an exception when one does not completely override the other and case preservation is required? Might be confusing, but I suspect it'd be pretty rare. |
Actually, if the goal is to preserve case in that context, they should both be provided. |
Hey @alexmv, what's the status on this? You had a chance to look into it any deeper? |
Apologies -- this had indeed slipped off my plate. Thanks for reminding me. Before I tag and release, can you check that the current master gives you an API that works for you? |
Thanks Alex. I think it works. Here's my revised
Should I also be |
Oh, BTW, |
|
Great, thanks. Updating the Sqitch code now. |
Version 1.10 is on its way to CPAN, if you want to update the dependency. |
Thanks! |
It looks like every key in a deploy.variables section is converted to lowercase, thus unusable as a psql variable if spelled in all caps in the scripts.
This limitation does not exists with the overriding command line argument, --set, which preserves the case.
The text was updated successfully, but these errors were encountered: