sub ButtonFactory { my ($custom_options, $shape, $text) = @_; $$custom_options{-items}{shape} = $shape; $$custom_options{-items}{text} = $text; return %{ merge( \%button_skeleton, $custom_options) }; } # merge is Hash::Merge