perl - Why is a 'use' statement executed first in a BEGIN block? -
when execute following code, can't locate somepackage.pm in @inc ...
.
begin { die; use somepackage; }
why use
executed before die
?
use somepackage
equivalent
begin { require somepackage; somepackage->import }
a begin
code block executed possible, is, moment completely defined. second begin
(which implied use
) defined first, , executed first.
Comments
Post a Comment