sub fooA { ... my $fooB = oneOfTheAboveModules( \&fooB ); ... $fooB->stop; return }