Which of the output lines you provided are the result of the warn $self->filename call? Also, what does a "normal" filename look like when printed? Seeing the difference will help.
Another question is why your code is using what appears to be a module installation process? Perhaps it tries to install on-the-fly? In which case perhaps it is best to get everything installed before running the code?