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 reply to Re: Importing constans and variables when "require"ing
by Perlbotics
in thread Importing constans and variables when "require"ing
by bliako
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |