[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Uploaded faqomatic 2.506-2 (source all) to master



Stephen Zander <srz@mckesson.com> writes:

> 'use lib ""' by its very nature puts any such directories at the front
> of @INC and "use" is special treated so that part of it happens at compile
> time...which is a long way of saying it doesn't matter whether it's inside
> or outside the BEGIN {}

Whether it's evaluated first isn't just all or nothing.  use still
comes first in BEGIN, from my tests.

-- nobeg  --
        $h = '/tmp';   use lib $h;   print "@INC\n";
-- inbeg  --
BEGIN { $h = '/tmp';   use lib $h; } print "@INC\n";
-- aftbeg --
BEGIN { $h = '/tmp'; } use lib $h;   print "@INC\n";
------------
% perl nobeg
/usr/lib/perl5/i386-linux/5.004 /usr/lib/perl5 /usr/local/lib/site_perl/i386-linux /usr/local/lib/site_perl .
% perl inbeg
/usr/lib/perl5/i386-linux/5.004 /usr/lib/perl5 /usr/local/lib/site_perl/i386-linux /usr/local/lib/site_perl .
% perl aftbeg
/tmp /usr/lib/perl5/i386-linux/5.004 /usr/lib/perl5 /usr/local/lib/site_perl/i386-linux /usr/local/lib/site_perl .

-- 
	 Carey Evans  http://home.clear.net.nz/pages/c.evans/

	  GNU GPL: "The Source will be with you... always."


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: