Indentation is broken, on the other hand the code to check the version looks like really complex, maybe you can use the =~ operator and strings comparisons in oder to make it more readable :) just pointing, maybe it's the easier which can be done, will check at test moment anyway :)