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

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

by LanX (Saint)
on Mar 24, 2021 at 02:54 UTC ( [id://11130250]=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?

That's an interesting idea.

This example dies under strict with Can't use string as a HASH ref and would "survive" with faulty magic after strict was removed.

For this not to be noticed under strict the symbolic ref has only to happen occasionally.

So yes it has an effect on runtime, but this is "only" exchanging one (fatal) bug with a weird bug in edge cases.

So what could happen is that someone thought removing strict fixed the bug in a long running script, which eventually produced broken data.

Well ... I think we agree that removing strict is not a good idea anyway.

One might only be able to make a case for short scripts and one-liners. But the longer you wait to activate strict the more expensive it gets.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Log In?
Username:
Password:

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

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

    No recent polls found