X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FLoader%2FDBI%2FMSSQL.pm;h=ca553795f2f9a9343b251638c509df0e5f5f4feb;hb=1fa1884903b09903ce89a3814e41bac9e91eea9d;hp=fc93a1c6a8cd0fdcc7b8e9759a6672d17b15845d;hpb=1f625792d3d7d77d23ca7db1fcc320bd977ad389;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/lib/DBIx/Class/Schema/Loader/DBI/MSSQL.pm b/lib/DBIx/Class/Schema/Loader/DBI/MSSQL.pm index fc93a1c..ca55379 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/MSSQL.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/MSSQL.pm @@ -9,7 +9,7 @@ use base qw/ use Carp::Clan qw/^DBIx::Class/; use Class::C3; -our $VERSION = '0.04999_10'; +our $VERSION = '0.04999_13'; =head1 NAME @@ -143,10 +143,11 @@ sub _extra_column_info { # strip parens $default =~ s/^\( (.*) \)\z/$1/x; - # Literal strings are in ''s, numbers are in ()s, everything else is a - # function. + # Literal strings are in ''s, numbers are in ()s (in some versions of + # MSSQL, in others they are unquoted) everything else is a function. $extra_info{default_value} = - $default =~ /^['(] (.*) [)']\z/x ? $1 : \$default; + $default =~ /^['(] (.*) [)']\z/x ? $1 : + $default =~ /^\d/ ? $default : \$default; } return \%extra_info; @@ -159,7 +160,7 @@ L =head1 AUTHOR -See L. +See L and L. =head1 LICENSE