sub myRunmodeA { my $self = shift; my $isOK = blah (foo, bar) ... } sub myRunmodeB { my $self = shift; fixBlahProblem(); ... } sub blah { return if param('problem') eq 'true'; } #### sub myRunmodeA { my $self = shift; if( blah (foo, bar) ) { #usual code } else { return $self->myRunmodeB; } }