in reply to How to freeze/thaw anonymous subroutines?

In addition to the comments of Juerd and crazyinsomniac above, I would direct your attention to this thread from a few days ago that dealt with the topic of serialising code references.

The summary of this thread is that B::Deparse can be used for only a limited subset of code references, due to the private scope of variables and closure bindings. In particular, this problem was demonstrated with code in this post by merlyn.

In light of this, it may be prudent to re-evaluate this requirement for serialised code references and shift this "external code" to child modules or external scripts.

 

  • Comment on Re: How to freeze/thaw anonymous subroutines?