in reply to Re: Problems with 'use lib'
in thread Problems with 'use lib'
I don't think this code will do what you want:
The "use lib" inside the BEGIN block will be executed before the assignment since it is also inside the BEGIN block. Try this instead:BEGIN { my $projectLocation = '/some/other/place'; use lib $projectLocation; }
The "use" is like another BEGIN so these two pieces of code will be executed in sequence now.my $projectLocation; BEGIN { $projectLocation = '/some/other/place'; } use lib $projectLocation;
-- Eric Hammond
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Problems with 'use lib'
by shenme (Priest) on Aug 21, 2003 at 18:02 UTC |