From: Justin Hunter Date: Fri, 10 Jul 2009 00:20:07 +0000 (-0700) Subject: use Tie::IxHash for an ordered hash X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=79be7a6069c083b2a7062af1957d62eea1e0e4eb;p=dbsrgits%2FSQL-Translator-2.0-ish.git use Tie::IxHash for an ordered hash --- diff --git a/lib/SQL/Translator/Object/Table.pm b/lib/SQL/Translator/Object/Table.pm index c038874..b2c764b 100644 --- a/lib/SQL/Translator/Object/Table.pm +++ b/lib/SQL/Translator/Object/Table.pm @@ -5,6 +5,7 @@ use MooseX::Types::Moose qw(HashRef Str); use MooseX::AttributeHelpers; use SQL::Translator::Types qw(Column Constraint Index Schema Sequence); use SQL::Translator::Object::Schema; +use Tie::IxHash; extends 'SQL::Translator::Object'; has 'name' => ( @@ -30,7 +31,7 @@ has 'columns' => ( } } }, - default => sub { {} }, + default => sub { my %hash = (); tie %hash, 'Tie::IxHash'; return \%hash }, ); has 'indexes' => (