Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Importing constans and variables when "require"ing

by tobyink (Canon)
on Feb 23, 2019 at 11:06 UTC ( [id://1230461]=note: print w/replies, xml ) Need Help??


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 (Monsignor) 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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1230461]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-24 01:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found