{ my $fixture_A = temdir(); # fixture in closure sub test1 ($fixture_B) { # no need to repeat A # uses fixture A and B } sub test2 ($fixture_C) { # no need to repeat A # uses fixture A and B } }