Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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

by stevieb (Canon)
on Mar 06, 2022 at 02:42 UTC ( [id://11141871]=note: print w/replies, xml ) Need Help??


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

If I don't use a specific variable outside the PM itself, do I need to export it?

No. In fact, please don't export variables at all. Use functions that access the variables, and export them instead.

To further, the names you're using lead me to believe that this is a good candidate for an Object Oriented module, therefore you won't have to export anything at all, plus you'll get the added benefit of being able to keep state within your objects.

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

Log In?
Username:
Password:

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

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

    No recent polls found