If you don't want to load code twice, use use or require. Using do is a bad idea as you found, as it will re-execute the code every time, and add the END{} blocks every time as well.
In reply to Re: Pkg::END{} executes 2+ times, on how many times use Pkg; or do Pkg.pm;
by Corion
in thread Pkg::END{} executes 2+ times, on how many times use Pkg; or do Pkg.pm;
by petr999
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |