in reply to __DATA__ Inconsistency
try using tell and seek to debug issues with __DATA__
I ran into problems where I was reading from __DATA__ in a module multiple times and one the second read the position had moved to the bottom. However this may not be your case, but using tell to get the position and printing it out might shed some light.