sub climb_up { my $self=shift; # nur gerade Anzahl von Werten pop(@_) if(@_%2); my %options=@_; $options{return_found}=1 unless(exists $options{return_found}); my $ok=2; if(!$options{code_find} or ref($options{code_find}) ne 'CODE') { $ok--; $options{code_find}=sub{}; $options{return_found}=0; } if(!$options{code_test} or ref($options{code_test}) ne 'CODE') { $ok--; $options{code_test}=sub{1}; } unless($ok) { croak(qq(in method "climb_up" "code_find" or "code_test" had to be defined! )); } my @ret; my $now=$self; while ( $now = $now->parent_row ) { my @r=$options{code_find}->($now); last unless( $options{code_test}->($now,@r) ); push(@ret,@r) if($options{return_found}); } return @ret; }