use map instead for on creating hash tables

This commit is contained in:
Milan
2020-03-05 22:16:54 +01:00
parent da5f7f673d
commit 41b0495c2e
24 changed files with 40 additions and 144 deletions

View File

@@ -16,13 +16,9 @@ sub debug;
sub get_columns($) {
my $config = shift;
my $dbh = db::connect($config);
my $cols = db::get_columns( $dbh, 'calcms_user_default_studios' );
my $columns = {};
for my $col (@$cols) {
$columns->{$col} = 1;
}
return $columns;
my $dbh = db::connect($config);
my $cols = db::get_columns( $dbh, 'calcms_user_default_studios' );
return { map { $_ => undef } @$cols };
}
sub get ($$) {