in reply to Perl objects and code references

XML::Parser is little bit cumbersome in 'pure' OO usage. If you are planning making a pure OO code, you should rather use DOM or SAX API. I personaly do not like DOM, as it is kind of non-perlish API. I would suggest XML::Grove with SAX for tree-like API or SAX parser directly for event API.
Some of this modules use XML::Parser internaly, but this is completly hidden to module user.

If you are determined to directly use XML::Parser anyway, check out replies to my question here.
especialy this solution with closures.