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