sub location { my $self = shit; my @opts = @_; if (scalar @opts) { ### Aufruf ist ein Setter ; Wauf, Wuff!!! if (scalar @opts % 2) { # nur ok wenn Paare von Attribut und Wert! $self->{plz} = $opts{plz}; $self->{location} = $opts{location}; return $self; } else { warn "Usage location BLAH BLAH BLUBB"; # Meckern weil falscher Aufruf return undef; # Fehler } } else { ### Aufruf ist wohl David Getter ;) return $self; } }