then i have :# test.pl #/usr/bin/perl use strict; use warnigns; BEGIN { use FindBin qw($RealBin); use lib "$RealBin/lib/"; $ENV{APP_ROOT} = $RealBin; } use MyApp::Conf qw/APP_NAME/; ... ...
when i run test.pl , MyApp::Conf error on undefined $ENV{APP_NAME}.. why is that?package MyApp::Conf; BEGIN { # do something with $ENV{APP_NAME} }
In reply to BEGIN block question by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |