Skip Menu |

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

Report information
The Basics
Id: 14366
Status: open
Priority: 0/
Queue: Class-DBI-FormBuilder

People
Owner: Nobody in particular
Requestors: rustyp [...] freeshell.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.451
Fixed in: (no value)



Subject: Case sensitivity problems
I'm not sure if this should be a wishlist item or a bug...it's sort of both. Data from the _columns_hash are being upper cased with the "uc" command, while calls to the column accessor are not upper casing the name. The end result is that this package will only work if you declare all of your Class::DBI column names in upper case. You might just want to include an init option that causes "Hash::Case" the _columns_hash to use "Hash::Case::Preserve" and forgo uppercasing everything. That way it will work correctly with case-sensitive database systems.
[guest - Tue Aug 30 09:24:29 2005]: Show quoted text
> I'm not sure if this should be a wishlist item or a bug...it's sort of > both. > > Data from the _columns_hash are being upper cased with the "uc" > command, while calls to the column accessor are not upper casing > the name. > > The end result is that this package will only work if you declare all > of your Class::DBI column names in upper case. > > You might just want to include an init option that causes "Hash::Case" > the _columns_hash to use "Hash::Case::Preserve" and forgo > uppercasing everything. That way it will work correctly with case- > sensitive database systems.
I think you're using an older version - upgrade and see if the error goes away. If not, send me any error messages you get. This code is extracting metadata from the db, and different dbs return it in slightly different formats (notably different case), and I only have MySQL to test against. d.
[rustyp@freeshell.org - Wed Aug 31 06:19:00 2005]: Show quoted text
> I'm using the version from CPAN which I installed yesterday. Further, > to be on the safe side, I reinstalled all dependencies of this package > when I installed it, so they're all fresh from CPAN. > > I think you've hit upon the problem: my RDBMS, which happens to be > case-insensitive (SQL Server with FreeTDS) is returning all uppercase > column names, which is not what I used in Class::DBI. > > The result is that the columns hash is all uppercase while the calls to > it are not. I was able to fix the problem by making _columns_hash > case-insensitive in precisely the manner I suggested: by making > _columns_hash actually use Hash::Case::Preserve.
If you've got some code that fixes this, could you post it (even if it's specific to your RDBMS)? And if possible, output from the error log. d.
From: rustyp [...] freeshell.org
After about 30 hours of work on it, I gave up on this module as basically unworkable (and threw away the very hacked up version of your module that I had created). None of "features" can be turned off, the customization API is unusual, unwieldy, and limited. Also, the way that you overrode the basic functions in CGI::FormBuilder made it almost impossible to customize the unsatisfactory (to me) result to match what I wanted it for without rewriting your whole module. So I ended up writing my own function that converts a Class::DBI object into a form that fits my needs. I told you everything you need to do to change that part. When you initialize _columns_hash, make tie it to Hash::Case::* (pick one of them) instead of making it a basic hash. If I recall correctly, that part was one line of code.
Date: Mon, 26 Sep 2005 01:22:18 +0100
From: David Baird <dave.riverside [...] gmail.com>
To: bug-Class-DBI-FormBuilder [...] rt.cpan.org
Subject: Re: [cpan #14366] Case sensitivity problems
RT-Send-Cc:
On 9/24/05, Guest via RT <bug-Class-DBI-FormBuilder@rt.cpan.org> wrote: Show quoted text
> > This message about Class-DBI-FormBuilder was sent to you by guest <> via rt.cpan.org > > Full context and any attached attachments can be found at: > <URL: https://rt.cpan.org/Ticket/Display.html?id=14366 > > > After about 30 hours of work on it, I gave up on this module as > basically unworkable (and threw away the very hacked up version of your > module that I had created). > > None of "features" can be turned off, the customization API is unusual, > unwieldy, and limited. Also, the way that you overrode the basic > functions in CGI::FormBuilder made it almost impossible to customize the > unsatisfactory (to me) result to match what I wanted it for without > rewriting your whole module. > > So I ended up writing my own function that converts a Class::DBI object > into a form that fits my needs. > > I told you everything you need to do to change that part. When you > initialize _columns_hash, make tie it to Hash::Case::* (pick one of > them) instead of making it a basic hash. If I recall correctly, that > part was one line of code. >
Well, if you don't want to share that one line of code, fair enough, and have a nice life. d.
Show quoted text
> > Well, if you don't want to share that one line of code, fair enough, > and have a nice life. > > d.
Rusty, I apologize, it's been a long day and I need to get some sleep. I read your whole email from completely the wrong perspective and didn't take the time to re-read it. I hope you're not too pissed off at me. OK, definitely time for me to quit for the night. Best wishes, David.
No problem. I'll certainly be looking in on the module from time to time. If you end up rewriting it in such a way that I can use it...or change it until I can use it, I may give it another try. The concept itself is a useful one. [DAVEBAIRD - Sun Sep 25 20:39:03 2005]: Show quoted text
>
> > > > Well, if you don't want to share that one line of code, fair enough, > > and have a nice life. > > > > d.
> > Rusty, I apologize, it's been a long day and I need to get some sleep. I > read your whole email from completely the wrong perspective and didn't > take the time to re-read it. I hope you're not too pissed off at me. > > OK, definitely time for me to quit for the night. > > Best wishes, > > David. >