Skip Menu |

This queue is for tickets about the DBIx-Class-Schema-Loader CPAN distribution.

Report information
The Basics
Id: 86091
Status: resolved
Priority: 0/
Queue: DBIx-Class-Schema-Loader

People
Owner: Nobody in particular
Requestors: martin.solciansky [...] bubble.eu
Cc:
AdminCc:

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



Subject: fix mysql schema loader for enums with empty string
Date: Wed, 12 Jun 2013 15:16:43 +0200 (CEST)
To: bug-DBIx-Class-Schema-Loader [...] rt.cpan.org
From: Martin SolĨiansky <martin.solciansky [...] bubble.eu>
when mysql enum contains an empty string (''), the regexp fails to provide correct values. for example: enum('','string1','string2') fails. possible solution: --- DBIx/Class/Schema/Loader/DBI/mysql.pm.orig 2013-02-26 17:35:52.000000000 +0100 +++ DBIx/Class/Schema/Loader/DBI/mysql.pm 2013-06-12 14:54:07.000000000 +0200 @@ -269,7 +269,7 @@ delete $info->{extra}{list}; - while ($column_type =~ /'((?:[^']* (?:''|\\')* [^']*)* [^\\'])',?/xg) { + while ($column_type =~ /'((?:(?:[^']* (?:''|\\')* [^']*)* [^\\'])|)',?/xg) { my $el = $1; $el =~ s/''/'/g; push @{ $info->{extra}{list} }, $el;
This has been fixed in 0.07036, released just now.