I did what you said, downloaded it and replaced, and it worked!
But then when I add my additional code to the file, I get error again: "KeyManager.pm" did not return a true value".
So what is this whitespace problem? White spaces should be ignored by perl, and I don't have new line after 1;
Is it about the newline character? I'm using Notepad++ on windows.