Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Do I have to export all variables and functions from my PM file?

by syphilis (Archbishop)
on Mar 05, 2022 at 23:55 UTC ( [id://11141869]=note: print w/replies, xml ) Need Help??


in reply to Do I have to export all variables and functions from my PM file?

And I've wondered if I must export functions, strings, arrays, etc. etc. that are not used outside of the PM module?

I just want to point out that (as you may already know) functions, package variables and package constants can all be accessed from the "outside" even if they're not exported. They just have to be accessed via their fully qualified names - eg My::Mod::foo() instead of simply foo(), $My::Mod::package_var instead of $package_var and My::Mod::CONST_VAL instead of CONST_VAL.

Cheers,
Rob

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-04-19 07:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found