In a typical run, carp is not needed, so Carp is only loaded when needed in an effort to speed up the program.
However, the savings are negligible unless the script is called frequently. And if the script is called frequently, the savings are eclipsed by those that would be obtained by using a persistant process.
There's really no reason to do this. Carp is a lightweight module.
In reply to Re^2: "require Carp" may be hazardous to your code
by ikegami
in thread "require Carp" may be hazardous to your code
by Steve_p
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |