@INC elements order

Hello All,

I'm using Active Perl 5.10.1 Build 1006. If I print the elements if [at] 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 [at] INC element?

I'll appreciate your comments. :-)

Thanks,

Paco

_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
fzarabozo [ Mo, 07 Dezember 2009 08:18 ] [ ID #2025085 ]

RE: @INC elements order

On Sun, 06 Dec 2009, Francisco Zarabozo wrote:
> I'm using Active Perl 5.10.1 Build 1006. If I print the elements if [at] 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 [at] 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 [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Jan Dubois [ Mo, 07 Dezember 2009 08:32 ] [ ID #2025086 ]
Perl » gmane.comp.lang.perl.active-perl » @INC elements order

Vorheriges Thema: Help with socket timeout
Nächstes Thema: PPM broken after installing ActivePerl 5.10.1 b1006