Since version 2.0, XML::Simple supports a strict mode which catches common errors. There's an article on strict mode here:
http://www.perlmonks.org/index.pl?node_id=218480