in reply to Importing constans and variables when "require"ing
use const does it's trick by creating a sub that returns a then "constant" value. Use the function call parents to honour that fact in the context of the print statement at compile time.
print "CONST=" . XYZ::CONST() . "\n"; # ^^-here
In Section
Seekers of Perl Wisdom