From: Rafael Kitover Date: Mon, 29 Mar 2010 10:58:41 +0000 (-0400) Subject: better case-sensitivity detection for MSSQL X-Git-Tag: 0.06000~18 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5ac72caaaf77512a44f6feaff3d7b446581d8f7b;p=dbsrgits%2FDBIx-Class-Schema-Loader.git better case-sensitivity detection for MSSQL --- diff --git a/lib/DBIx/Class/Schema/Loader/DBI/MSSQL.pm b/lib/DBIx/Class/Schema/Loader/DBI/MSSQL.pm index debfbde..8606a2e 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/MSSQL.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/MSSQL.pm @@ -56,9 +56,9 @@ sub _setup { return; } - my ($sensitivity) = $collation_name =~ /(C\w)_[A-z]+\z/; + my $case_sensitive = $collation_name =~ /_(?:CS|BIN2?)(?:_|\z)/; - $self->case_sensitive_collation($sensitivity eq 'CS' ? 1 : 0); + $self->case_sensitive_collation($case_sensitive ? 1 : 0); } sub _lc {