From: Justin Hunter Date: Fri, 10 Jul 2009 22:53:20 +0000 (-0700) Subject: use Tie::IxHash default X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2e4bad4fa66880f52b9c5f09c75cc17eb5f065c8;p=dbsrgits%2FSQL-Translator-2.0-ish.git use Tie::IxHash default --- diff --git a/lib/SQL/Translator/Object/Constraint.pm b/lib/SQL/Translator/Object/Constraint.pm index 525a529..992d414 100644 --- a/lib/SQL/Translator/Object/Constraint.pm +++ b/lib/SQL/Translator/Object/Constraint.pm @@ -29,7 +29,7 @@ has 'columns' => ( } } }, - required => 1 + default => sub { my %hash = (); tie %hash, 'Tie::IxHash'; return \%hash }, ); has 'type' => ( diff --git a/lib/SQL/Translator/Object/Index.pm b/lib/SQL/Translator/Object/Index.pm index 11a4706..64e540a 100644 --- a/lib/SQL/Translator/Object/Index.pm +++ b/lib/SQL/Translator/Object/Index.pm @@ -29,7 +29,7 @@ has 'columns' => ( } } }, - default => sub { {} }, + default => sub { my %hash = (); tie %hash, 'Tie::IxHash'; return \%hash }, ); has 'type' => ( diff --git a/lib/SQL/Translator/Object/View.pm b/lib/SQL/Translator/Object/View.pm index feffecf..987c728 100644 --- a/lib/SQL/Translator/Object/View.pm +++ b/lib/SQL/Translator/Object/View.pm @@ -29,7 +29,7 @@ has 'columns' => ( } } }, - default => sub { {} }, + default => sub { my %hash = (); tie %hash, 'Tie::IxHash'; return \%hash }, ); has 'sql' => (