From d4da48fc6a3041859215c7e51a946d645f01bed4 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 28 Jun 2007 02:14:44 +0000 Subject: [PATCH] DBSchema::DBD::mysql reverse-engineering patch from Brian Phillips, closes: CPAN#17582, thanks! --- DBSchema/DBD/mysql.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DBSchema/DBD/mysql.pm b/DBSchema/DBD/mysql.pm index 7647b0f..ef7bb59 100644 --- a/DBSchema/DBD/mysql.pm +++ b/DBSchema/DBD/mysql.pm @@ -4,7 +4,7 @@ use strict; use vars qw($VERSION @ISA %typemap); use DBIx::DBSchema::DBD; -$VERSION = '0.04'; +$VERSION = '0.05'; @ISA = qw(DBIx::DBSchema::DBD); %typemap = ( @@ -37,7 +37,7 @@ sub columns { my $sth = $dbh->prepare("SHOW COLUMNS FROM $table") or die $dbh->errstr; $sth->execute or die $sth->errstr; map { - $_->{'Type'} =~ /^(\w+)\(?(.+)?\)?( unsigned)?$/ + $_->{'Type'} =~ /^(\w+)\(?([^)]+)?\)?( unsigned)?$/ or die "Illegal type: ". $_->{'Type'}. "\n"; my($type, $length) = ($1, $2); [ -- 2.20.1