in reply to Using open3 within a Safe reval

Looks to me like $method is undef at the point at which you execute it. If that is not enough for you to track down this issue, you will have to post more context, such as the instantiation of the compartment and the intervening code.