in reply to Pkg::END{} executes 2+ times, on how many times use Pkg; or do Pkg.pm;
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.
|
|---|