On Jul 7, 2005, at 8:16, Peter Rabbitson wrote:
Hello everyone,
Most modules I run across have a BEGIN block containing some variable
declarations, module loaders etc. Although I understand what BEGIN is
(code being evaluated immediately after it is parsed), I miss the
point
of the excercise.
It is very simple: BEGIN is appropriate when you need something to be
executed at compilation time. That's it. If your code does not need
anything to be executed there, then you don't need a BEGIN block. You
seem to assume that the lack of BEGIN blocks in your programs is
suspicious, as if you were missing something. Well, probably you
don't, BEGIN blocks are not that common in everyday programming, I
need them just occasionally.
-- fxn
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>