sub Button { my( $parent, $text, $command, %options ) = @_; ref $text ? $options{-textvariable} = $text : $options{-text} = $text; ref $command ? $options{-command} = $command : $options{-background} = '#ff0000'; return $parent->Button( -background => '#ffdd00', -font => $MyApp::Config::DefaultFont, ... %options, ); }