in reply to BEGIN block question

From permod:

A BEGIN code block is executed as soon as possible, that is, the moment it is completely defined, even before the rest of the containing file (or string) is parsed.

Your BEGIN block in test.pl is executed before your use MyApp::Conf qw/APP_NAME/; statement

Replies are listed 'Best First'.
Re^2: BEGIN block question
by Anonymous Monk on Jun 05, 2007 at 21:59 UTC
    you seemed to refer to the code that has use MyApp::Conf qw/APP_NAME/; outside the BEGIN block. in that case, after the BEGIN block run, $ENV{APP_NAME} is set and use MyApp::Conf qw/APP_NAME/; runs fine.

    it is only problem whei put use MyApp::Conf qw/APP_NAME/; inside the block as the last line.

      While everything I wrote is correct, it just didn't answer your question at all. Sorry.