Hi Vladimir,

This code

Our $BASE_PATH = '\web_test\';
Use lib $BASE_PATH.'scripts\common\';
Require 'header.pl';

can't work as use "statements" are executed by perl before of the rest of the code. The most common way 2 solve this problem is 2 use constants:


use constant BASE_PATH => '\web_test\';
use lib BASE_PATH.'scripts\common\';
Require 'header.pl';

should work.

Alternatively you could put

Our $BASE_PATH = '\web_test\';

in a BEGIN-BLOCK

BEGIN { Our $BASE_PATH = '\web_test\'; }
use lib BASE_PATH.'scripts\common\';
Require 'header.pl';


should work too.

HTH
George Mavridis
_______________________________________________
Perl-Unix-Users mailing list
Perl-Unix-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to