if( exists $copyRef->{ $step } ) { $copyRef = $copyRef->{ $step }; } else { lock %{ $copyRef }; $copyRef = $copyRef->{ $step } = &share( {} ); }