in reply to Data::Dumper is not quite what I want.

I see several solutions. You could use tie to change the stringification of your coderefs (I think). You could just emit code to chage the DUMMYies after the Data::Dumper generated code. You could do some sort of parsing of the Data::Dumper output. You could write the thing yourself. You could use another serialization provider that /does/ provide the ablity to hook into it. You could use the Toaster or Freezer methods of Dumper (though I'm not sure how well they'd work for you).

Oh, bingo: See the examples section of the docs, and the Seen method.


Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

  • Comment on Re: Data::Dumper is not quite what I want.

Replies are listed 'Best First'.
Re: Re: Data::Dumper is not quite what I want.
by John M. Dlugosz (Monsignor) on Dec 27, 2002 at 15:54 UTC
    The only example that uses Seen gives me "Only refs supported, ignoring non-ref item $*c" on the call to Seen.