Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
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} }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: BEGIN block question
by FunkyMonk (Bishop) on Jun 05, 2007 at 21:45 UTC | |
by Anonymous Monk on Jun 05, 2007 at 21:59 UTC | |
by FunkyMonk (Bishop) on Jun 05, 2007 at 22:20 UTC | |
|
Re: BEGIN block question
by Anonymous Monk on Jun 05, 2007 at 21:41 UTC | |
by kyle (Abbot) on Jun 05, 2007 at 21:55 UTC | |
by Anonymous Monk on Jun 05, 2007 at 22:02 UTC | |
by merlyn (Sage) on Jun 05, 2007 at 21:54 UTC | |
by ikegami (Patriarch) on Jun 05, 2007 at 23:42 UTC |