Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Is 'use vars' really obsolete?

by Anonymous Monk
on Sep 19, 2017 at 13:11 UTC ( [id://1199670]=note: print w/replies, xml ) Need Help??


in reply to Is 'use vars' really obsolete?

Strongly agree with the preceding Anonymous post. Put different packages in different files no matter how large or small they are. (After all, now you always know where it is!) It is also a good idea to provide functions in a package to manipulate variables in that package, if only to document (within the package) that the value is used elsewhere. Some pragmas and constructs exist because someone needed them at the time, not because they represent the most-maintable way to write code, especially in a large project. Also, insofar as possible, try to continue a project so that it consistently does things in one way throughout. It is much harder to maintain code that does the same thing in two ways, old and new.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-23 19:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found