The result was that XML::Twig ran 17 times faster, which surprised me.
The Dispatcher code was cleaner than the Twig code. This is because I was able to remove the code I wrote to get my Twig return values to come out in the correct order. The order of the data from Dispatcher worked the way that I had orgininally hoped that Twig would work.
The speed is a big deal for me, because the Twig code is actually already slower than I would like it to be. The Dispatcher code is probably not fast enough for my application. I'm tempted to write the code again and use a format other than XML to see how fast it runs.
It would be nice if I had a program that would automatically measure the complexity of a perl program. I would like to be able to compare the complexity of the implementations with a numerical technique.
If anyone wants to see the two approaches and the test data, let me know and I'll post it on tomacorp (We're not a corporation).
New Module Testing
I installed and tried PerlBean, which looks useful for automating the generation of perl objects. Before I use it in a real project, I need to understand if there is a way to use it so that the classes can be redesigned without losing work. The straightforward way looks like you would have to edit the class by hand after the initial run of the module, and if you want to run it again you would have to cut and paste the custom methods in again.
Perhaps there is a way around this. PerlBean would make a good core for a perl IDE, I think.
I sent a bug report to the author of PerlBean. It looks like the tutorial didn't get an update after an API change.