From: Michael G Schwern Date: Tue, 11 Mar 2008 00:38:09 +0000 (+0000) Subject: No reason to store an empty hash ref for each column X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8eae3205913692e5828b2d82b26ac73236d28682;p=dbsrgits%2FDBIx-Class-Historic.git No reason to store an empty hash ref for each column --- diff --git a/lib/DBIx/Class/CDBICompat/ColumnGroups.pm b/lib/DBIx/Class/CDBICompat/ColumnGroups.pm index 829f589..530aaac 100644 --- a/lib/DBIx/Class/CDBICompat/ColumnGroups.pm +++ b/lib/DBIx/Class/CDBICompat/ColumnGroups.pm @@ -33,20 +33,20 @@ sub _register_column_group { if ($group eq 'Primary') { $class->set_primary_key(@cols); - $groups->{'Essential'}{$_} ||= {} for @cols; + $groups->{'Essential'}{$_} ||= 1 for @cols; } if ($group eq 'All') { unless (exists $class->_column_groups->{'Primary'}) { - $groups->{'Primary'}{$cols[0]} = {}; + $groups->{'Primary'}{$cols[0]} = 1; $class->set_primary_key($cols[0]); } unless (exists $class->_column_groups->{'Essential'}) { - $groups->{'Essential'}{$cols[0]} = {}; + $groups->{'Essential'}{$cols[0]} = 1; } } - $groups->{$group}{$_} ||= {} for @cols; + $groups->{$group}{$_} ||= 1 for @cols; $class->_column_groups($groups); }