@INC elements order
am 07.12.2009 08:18:16 von fzarabozo
Hello All,
I'm using Active Perl 5.10.1 Build 1006. If I print the elements if @INC, i
get the following:
-----------------
D:/usr/site/lib
D:/usr/lib
..
-----------------
I'm not sure about this (I don't know if this is correct or my
installation/configuration is wrong at some point). Shouldn't "." be the
first @INC element?
I'll appreciate your comments. :-)
Thanks,
Paco
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: @INC elements order
am 07.12.2009 08:32:58 von Jan Dubois
On Sun, 06 Dec 2009, Francisco Zarabozo wrote:
> I'm using Active Perl 5.10.1 Build 1006. If I print the elements if @INC, i
> get the following:
>
> -----------------
> D:/usr/site/lib
> D:/usr/lib
> .
> -----------------
>
> I'm not sure about this (I don't know if this is correct or my
> installation/configuration is wrong at some point). Shouldn't "." be the
> first @INC element?
No, having '.' last is intentional. Otherwise any accidental file in the
current directory would override modules included with Perl itself, potentially
breaking other software. It would also be a security risk to have '.' first.
Think about someone putting a hacked strict.pm into some world writable
directory and then tricking an administrator to invoke a Perl script while
being in that directory...
Cheers,
-Jan
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs