[Dbix-class] Bug in SQL::Abstract's generate method

Stefan Hornburg (Racke) racke at linuxia.de
Sat Nov 12 11:22:06 GMT 2011


On 11/10/2011 04:50 PM, xli wrote:
> On 11/10/11, Stefan Hornburg (Racke)<racke at linuxia.de>  wrote:
>> Hello,
>>
>> I'm seeking help on a bug that I ran into with SQL::Abstract, so I'm writing
>> to this
>> list as advised on the POD of SQL::Abstract.
>>
>> Simple test script to demonstrate the problem:
>>
>> --snip--
>> #! /usr/bin/env perl
>>
>> use SQL::Abstract;
>>
>> my $sqla;
>>
>> $sqla = SQL::Abstract->new;
>>
>> $stmt = $sqla->generate('create table',  'products', ['sku varchar(32)',
>> 'name varchar(255)']);
>>
>> print "STMT: $stmt\n";
>> --snap--
>>
>> racke at argus:~/shop/dancer$ ~/bin/sqla
>> STMT: CREATE TABLE PRODUCTS (sku varchar(32), name varchar(255))
>>
>> This generates table PRODUCTS (uppercase) instead of products, which is not
>> the same
>> table.
>>
>> Feedback is appreciated :-).
>>
>
>
> $stmt = $sqla->generate('create table',
>    \'products', ['sku varchar(32)', 'name varchar(255)']);
>

That works, thanks a lot!

Regards
	Racke

-- 
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team




More information about the DBIx-Class mailing list