All the modules I looked at for parsing XML, this one was the clear winner. I have data in XML files and I wanted simple convenient access to the contents. You can probably get to individual data items in fewer steps than with any other module. If this is your task, this is the module for you.
The fact that you have the option of using the built-in parser instead of XML::Parse is great if you need it to be lightweight and more easily self-contained as pure perl.
Error handling could be improved, and it is a bit confusing that every "query" into the structure returns an object, even if there isn't anything there... you have to test with is_node after attempting to access a node to see if such a node really exists. Might be nice if you could apply DTDs to data being read for error checking. So, if there is a question as to whether your XML files are well formed or not, then you might need another heavier duty module.
But I'm not complaining... it's free and it does the job better than anything else I've seen. Thanks to the author for contributing it to the community!
4 out of 5 found this review helpful. Was this review helpful to you? Yes No
I've looked at pretty much every image manipulation extension to Perl that I could find on CPAN. For doing basic operations like opening an image, cropping it and saving it back, it seemed to be among the most straightforward of the bunch. Thus I started using it for my latest project.
I was at first disappointed to discover that I couldn't do something I somehow assumed there would be a function for (I needed to replace one color in an image with another) and almost gave up on it, until I discovered Imager::Transform2().
It's rather complex to understand at first, and it may take a day or so to figure out, but wow... the things you can do with it once you learn how it works. You can write simple or complex expressions that are applied to every pixel in an image... but unlike other interfaces where you fetch one pixel at a time, do something with it in perl, and then put it back (which can be pretty slow for a large image), it internally compiles your expression into virtual machine code which executes as speed comparable with custom C routines. However, you don't need to write a whole XS module and compile it and try to distribute it with your project. It's just a line of perl code with the expression in it that you can dynamically build in perl if necessary. Documentation about it could be a bit clearer in places.
Imager::Transform2 is amazing to me and will allow me to do most things I could need if builtin functions don't already exist.
Other than that, the file support could be beefed up some to support more formats, which I guess would be fairly straightforward. Also PNG files written seem to be larger than the originals even if you just read it in and write it out, so some compression setting is probably needed there by default.
Overall, I think I've found a keeper.
7 out of 7 found this review helpful. Was this review helpful to you? Yes No