in reply to Where to put long BEGIN blocks used by many programs...
Make it a module. use will automatically run the code at compilation time. You can even leave out the explicit BEGIN block.
Also, pull those use clauses out of your function. use is unconditionally executed at compile time, so putting them in there is just misleading.
PS.: please take the time to learn about PerlMonks linking syntax and use it. Since I read PM using www.perlmonks.org, my cookie is set for that host, so following your link sends me to a page where I'm not logged in. As a bonus, using [id://420722] would have inserted the title of your thread into the text automagically.
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Where to put long BEGIN blocks used by many programs...
by argv (Pilgrim) on Jan 11, 2005 at 06:01 UTC | |
by Aristotle (Chancellor) on Jan 11, 2005 at 10:11 UTC |