in reply to Dispatch Table and Data::Dumper

Data::Dumper is incapable of properly dumping closures. You can use it (at least later versions) as an alternate interface to B::Deparse which can dump code, but unfortunately Deparse is only able to tell half the story, that is the source code involved in the subroutine, it is not able to provide the context required to properly recreate a closure. DD should be able to provide the context, but for many reasons it does not.

Enter Data::Dump::Streamer. DDS is specifically designed to be capable of dumping closures properly. diotalevi and I spent a fair amount of time making the closure dumping code work properly and IMO we have done a pretty reasonable job. In some situations you may find that DDS needs to rename some of the variables you used in your code, but under normal circumstances this isnt required.

If you have any trouble with using DDS for this please let me know.

Update: Fixed diotalevis name. :-)


  • Comment on Re: Dispatch Table and Data::Dumper (use Data::Dump::Streamer instead)

Replies are listed 'Best First'.
Re^2: Dispatch Table and Data::Dumper (use Data::Dump::Streamer instead)
by diotalevi (Canon) on Oct 19, 2005 at 18:38 UTC
    'd' isn't capitalized when you start a sentence with my name.