in reply to XML and code snippets

Well, you have a code reference in your data structure and obviously XML::Simple cannot dump that. Simple, eh? ;-)

That is because perl does not store the coderef in source (as text) but in compiled form somewhere in memory. So it can never be dumped. Maybe you want to store the code as text in your structure and eval it where appropriate.


holli, /regexed monk/

Replies are listed 'Best First'.
Re^2: XML and code snippets
by Scarborough (Hermit) on Jul 28, 2005 at 13:17 UTC
    Sorry not clear, I understood why it didn't work and when I take out the code ref. it works fine. I was wondering if anyone had tried a way to store code in XML! I don't wont to waste lots of time if I'm never going to get anywhere.

    UPDATE. Thanks for the second line I'll give it a try.