Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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

by demerphq (Chancellor)
on Oct 19, 2005 at 14:19 UTC ( [id://501310]=note: print w/replies, xml ) Need Help??


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. :-)

---
$world=~s/war/peace/g

  • 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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://501310]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-25 13:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found