Are you saying that line 992 of the generated Makefile contains the string "Makefile.PL" ?
That would seem very strange to me.
Did it contain the same string before you altered getLibVersion ?
Could you provide (placed inside <code> and </code> tags) a copy'n'paste of lines 988 to 996 (or thereabouts) ?