Additionally: If it's module B that wants to know where its file is, you can make use of the __FILE__ token, but only from within the module itself (documented in perldata). That could be in a sub defined in that module which you can call from anywhere.
Alternatively you could just not care where exactly the config file is stored, and just search for it yourself in @INC.
Comment on Re^2: Location reference - programming style