package LoginFenster; use strict; use Tk; use vars qw($VERSION); $VERSION = 0.01; use Alias qw(attr); use vars qw($MW); my %felder = ( MW=>undef, ); sub new { my $that = shift; my $class = ref($that)||$that; my $self = { %felder, }; bless $self, $class; init(); return $self; } sub init { $MW = tkinit(-title=> 'Anmeldung'); #... MainLoop; }