in reply to Importing constans and variables when "require"ing

Others have hopefully helped you understand what the issue is. I'll add this:

use XYZ ();

By specifying an explicit empty list at the end of the use statement, Perl will avoid importing anything from the module, but will still load it at compile time. So XYZ::CONST will work.

Replies are listed 'Best First'.
Re^2: Importing constans and variables when "require"ing
by bliako (Abbot) on Feb 23, 2019 at 11:43 UTC

    that's useful for me: I usually prefer using the full name of foreign subs anyway. thank you