From: John Napiorkowski Date: Tue, 9 Jun 2009 13:02:54 +0000 (+0000) Subject: using line normalization for deployment statements X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ee91c3e0bcf691b80d30c56709617e9ea6854406;p=dbsrgits%2FDBIx-Class-Historic.git using line normalization for deployment statements --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index bdb3a60..67850bc 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -1691,12 +1691,16 @@ sub deployment_statements { my $filename = $schema->ddl_filename($type, $version, $dir); if(-f $filename) { - my $file; - open($file, "<$filename") - or $self->throw_exception("Can't open $filename ($!)"); - my @rows = <$file>; - close($file); - return join('', @rows); + my $fh = $self->_normalize_fh_from_args($filename); + my @lines = $self->_normalize_lines_from_fh($fh); + return join('', @lines); + + ##my $file; + ##open($file, "<$filename") + ## or $self->throw_exception("Can't open $filename ($!)"); + ##my @rows = <$file>; + ##close($file); + ##return join('', @rows); } $self->throw_exception(q{Can't deploy without SQL::Translator 0.09003: '}