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:
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")our $var; BEGIN { $var= "Hello"; }
In Section
Seekers of Perl Wisdom