I would use configuration file instead.
Path to configuration file can be:
some global known path like /etc
home dir subdirectory, example: ~/.myapp
Path relative to main application .pl file location - see Perl FindBin core module
UPD
But if you want to modify .pm at build time - at least, please, write another .pm file from scratch. (like MyConfig.pm) it should contain only variables, nothing except that.