Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

(tye)Re2: "use vars" will remain (Re: Win32 EXPORT_OK problems)

by tye (Sage)
on Dec 27, 2000 at 01:48 UTC ( #48353=note: print w/replies, xml ) Need Help??


in reply to Re: (tye)Re: "use vars" will remain (Re: Win32 EXPORT_OK problems)
in thread Win32 EXPORT_OK problems

declaration and initialization can be done in one step

Ah, yes, but should they? Even I were to use our, I'd still be writing code like:

our $var; BEGIN { $var= "Hello"; }
to avoid the race condition between the compile-time declaration of the variable and the (possibly very delayed or non-existant) run-time initialization of the variable. This is only rarely a problem, but it still happens often enough that this habit has saved me enough time that I continue it.

        - tye (but my friends call me "Tye")

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2020-02-26 20:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (117 votes). Check out past polls.

    Notices?