Slashdot Mirror


XML::Simple for Perl Developers

An anonymous reader writes "XML has become pervasive in the computing world and is buried more and more deeply into modern applications and operating systems. It's imperative for the Perl programmer to develop a good understanding of how to use it. In a surprisingly large number of cases, you only need one tool to integrate XML into a Perl application, XML::Simple. This article tells you where to get it, how to use it, and where to go next."

3 of 186 comments (clear)

  1. Re:Who The Hell Still Uses Perl? by fyngyrz · · Score: 3, Interesting
    Shitty... as opposed to what, PHP?

    Well, certainly as opposed to Python, anyway. I went from perl to Python with a huge sigh of relief. I try to move a still-used perl script from perl to python once a week. Eventually I'll get them all, and I can leave the language behind. But I wrote tons of perl before I discovered Python and it is a long, long road to upgrade all that stuff. But every time I do one, I get a more maintainable, more english-like tool. Sometimes it takes me several minutes to even understand what the heck a perl script (even one of mine) is trying to do. Perl just... doesn't lead you to the most readable solutions. In fact, the better at it you get, the more obscure looking your programs get, it seems to me. That's an IMHO. :)

    Anyway, if someone is looking for a scripting language today, Python is the cat's meow. Readable, sensible, extensible, flexible, well supplied with great libraries of functionality, powerful as hell, very easy to debug, not unreasonable in speed.

    --
    I've fallen off your lawn, and I can't get up.
  2. I came in here to say this by Wee · · Score: 4, Interesting
    Was exactly what I was going to say. I've used XML::Simple a lot, but only for reading in small documents, like config files. It works well for that. But I'd never use it on something that was bigger than, say, 100K. It's too slow and resource intensive. It does, however live up to its name. It's a very simple interface to an XML doc.

    One thing I user it for was representing a database in XML. Once I had the DB layout in a datastructure, it was one line to print it out. Of course, this was before I knew about DBIx::XML_RDB...

    -B

    --

    Ash and Hickory, straight-grained and true, make excellent bludgeons, dandy for the cudgeling of vegetarians.

  3. Re:Who The Hell Still Uses Perl? by texwtf · · Score: 4, Interesting

    The fact that whitespace is dogmatized by the pyhon community makes the community
    itself less attractive, and the language because of it. It sends the message that
    it doesn't really matter what you want, the language is perfect and your code
    is crap because you are too stupid to agree with how right the community is.

    Guido could _easily_ put in some sort of pragma to allow other types of blocks, it's
    only a matter of arrogance that stops him- coding with whitespace is the "right" way to do it.

    There's also the matter of the parser. The last time I used Python everything was a syntax error, which gave little indication what was actually wrong with a piece of
    code.