From: Dagfinn Ilmari Mannsåker Date: Sun, 17 Mar 2013 17:20:59 +0000 (+0000) Subject: Use accessor for table options in MySQL producer X-Git-Tag: v0.011017~21 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fcc18942e8dfb0eee2391f0ea9a7841b76f94a65;p=dbsrgits%2FSQL-Translator.git Use accessor for table options in MySQL producer Since the Mooification it returns the arrayref stored in the object in scalar context, even if it hadn't been set originally. --- diff --git a/lib/SQL/Translator/Producer/MySQL.pm b/lib/SQL/Translator/Producer/MySQL.pm index c0e7637..1f8c541 100644 --- a/lib/SQL/Translator/Producer/MySQL.pm +++ b/lib/SQL/Translator/Producer/MySQL.pm @@ -156,9 +156,7 @@ sub preprocess_schema { # TYPE is a synonym, but ENGINE is the preferred option name. # - # We have to use the hash directly here since otherwise there is no way - # to remove options. - my $options = ( $table->{options} ||= []); + my $options = $table->options; # If multiple option names, normalize to the first one if (ref $opt_name) {