[Bast-commits] r6558 -
DBIx-Class/0.08/branches/run_file_against_storage/lib/DBIx/Class/Storage
jnapiorkowski at dev.catalyst.perl.org
jnapiorkowski at dev.catalyst.perl.org
Tue Jun 9 13:02:54 GMT 2009
Author: jnapiorkowski
Date: 2009-06-09 13:02:54 +0000 (Tue, 09 Jun 2009)
New Revision: 6558
Modified:
DBIx-Class/0.08/branches/run_file_against_storage/lib/DBIx/Class/Storage/DBI.pm
Log:
using line normalization for deployment statements
Modified: DBIx-Class/0.08/branches/run_file_against_storage/lib/DBIx/Class/Storage/DBI.pm
===================================================================
--- DBIx-Class/0.08/branches/run_file_against_storage/lib/DBIx/Class/Storage/DBI.pm 2009-06-09 11:12:46 UTC (rev 6557)
+++ DBIx-Class/0.08/branches/run_file_against_storage/lib/DBIx/Class/Storage/DBI.pm 2009-06-09 13:02:54 UTC (rev 6558)
@@ -1691,12 +1691,16 @@
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: '}
More information about the Bast-commits
mailing list