Another case closed (or: That'll teach me to rtfm first)

richardc on 2002-07-26T16:34:35

Previously I noted that people seem to have a common complaint with XML::Simple, in that it's unlikely to output what was fed to it.

Well I guess that people aren't reading the docs[0], to quote:

Because there are so many options, it's hard for new users to know which ones are important, so here are the two you really need to know about:
  • check out 'forcearray' because you'll almost certainly want to turn it on
...

This option is especially useful if the data structure is likely to be written back out as XML and the default behaviour of rolling single nested elements up into attributes is not desirable.

So, since I can't be there to make everyone read documentation, I'm just going to look for a new problem to hack on.

[0] Yes even me, but then I wasn't using the module because people had complained so much about it.


forcearray

petdance on 2002-07-26T16:38:48

Oh lordy yes, the whole forcearray thing fixes all those "rarely show up" bummers where the one time you have a single line item in an invoice you get back a scalar instead of a ref to an array.

Been bitten on that twice myself now...