in reply to Importing constans and variables when "require"ing
require is evaluated at run time. use is evaluated at compile time. Your errors are coming at compile time, and since the require hasn't been evaluated yet, the compiler can't know about what's in the XYZ.pm file at that time. Change your require to use, and you should be good.
In Section
Seekers of Perl Wisdom