Note that converting to "our" means that you're now using a global variable instead of a lexical variable.
Well, not quite.. our makes not global globals, but package globals (what if there's no package?). Also, it makes file globals whose scope spans packages in the same file. And our allows for sharing variables between files. But yes, our should be used with caution.
That said, I just don't like do FILE. do BLOCK is fine, but do FILE feels dangerous.
But require is IMHO just an enhanced do, and use an enhanced require. Aren't those functions nested like a Matryoshka doll? And innermost - there's just the eevil string eval: eval `cat $file`. I guess do, require and use are equally dangerous...
Please correct me if I'm wrong. (either me or perlfaq8 ;-)
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
In reply to Re^2: strict/do question
by shmem
in thread strict/do question
by dch
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |