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

[MacPerl] More On Taint Checks



With MacPerl, unlike Unix perl, the primary lib directories are not
hardcoded into the binary.  With tainting on, in MacPerl, those paths are
not used in @INC, so you cannot use modules.

To fix this, you will need to prepend this line to the beginning of your
scripts that do taint checks:

BEGIN {unshift @INC, "$ENV{MACPERL}lib:MacPPC:","$ENV{MACPERL}lib:"}

That should do the trick.

Note: if you want to use everything you have in your preferences as part of
@INC, you can use:

BEGIN {unshift @INC, "$ENV{MACPERL}lib:MacPPC:", map{"$_:"}
split(/,/,$ENV{PERL5LIB})}

This is less secure, but includes everything in your preferences.

--
Chris Nandor               pudge@pobox.com           http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])
#==                    MacPerl: Power and Ease                     ==#
#==    Publishing Date: Early 1998. http://www.ptf.com/macperl/    ==#



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch