Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^5: How to import "global" variables into sub-scripts from main script?

by jcb (Parson)
on Mar 24, 2021 at 01:32 UTC ( [id://11130249]=note: print w/replies, xml ) Need Help??


in reply to Re^4: How to import "global" variables into sub-scripts from main script?
in thread How to import "global" variables into sub-scripts from main script?

Assuming that all code paths are actually exercised in development/testing with strict in effect, I would expect a testing cycle to prove that the program is type-safe with respect to hard-references/other-data, such that symbolic references could not be encountered at runtime that were not seen in testing. This requires that the tests are actually thorough and near-exhaustive.

For our questioner, that is a very large assumption and I would not be surprised to find that the code that produced this question has no testsuite.

In terms of runtime performance, I doubt that strict 'refs' has any effect at all: perl must check for symbolic references in any case as it can never assume that a dereferenced value will actually be a reference and the only difference is whether a possible symbolic reference is considered or an error immediately thrown when dereferencing something other than a hard reference.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-04-16 06:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found