package MyTest::Lite; no autovivification; use parent 'MyTest::Base'; use strict; sub new { my $self = shift; my $parent = $self -> SUPER::new ; return bless { Parent => $parent, @_} , $self; } sub chkAccessRight { my $self = shift; print "Lite chkAccessRight @_$/"; if ( $self -> {Usr} ) { return $self->{Parent}->SUPER::chkAccessRight ( $self->{Usr} , shift ) ; } else { return $self->{Parent}->SUPER::chkAccessRight ( @_ ) ; } return 1; } sub tryAccess { my $self = shift; print "Lite tryAccess @_$/"; if ( $self -> {Usr} ) { return $self->{Parent}->SUPER::tryAccess ( $self->{Usr} , shift ) ; } else { return $self->{Parent}->SUPER::tryAccess ( @_) ; } } 1;