I'm adding an object or two, and wanted to write my own __dump() method so I can be dumped out by Data::Dumper.

Right now, there doesn't seem to be a way to integrate nicely with the indent level of the data structure I'm embedded in, so I see things like:

    PerlArray (size:2) [
        PMC 'TclWord' (size:1) [
chunk:puts
],
        PMC 'TclWord' (size:1) [
chunk:$b(a)
]
    ]


I see a few options:


(1) Tell me the indent level, so I can handle it manually.
(2) Have me return a DS instead of printing directly.
(3) Pass me an object as one of the parameters, with handy utility methods for dumping strings and other predefined types.



--
Will "Coke" Coleda will at coleda dot com




Reply via email to