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

Popular posts from this blog

Cursor error with postgresql, pgpool and php -

delphi - ESC/P programming! -

c++ - error: use of deleted function -