... use Tk; ... { my $mw = MainWindow->new(); ... configure_option_database($mw); ... build_menu_bar($mw); ... }