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
In reply to Re: Re: Problems with 'use lib'
by esh
in thread Problems with 'use lib'
by hotshot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |