Forum Moderators: coopster & phranque

Message Too Old, No Replies

How to Use Perl Modules

         

lindajames

8:52 pm on May 15, 2003 (gmt 0)

10+ Year Member



Hi,

I have a code that uses a .pm file called mysettings.pm

in my code it says:

use MySettings;

I am hosting on windows2000 and it seems that visitors can directly access the mysettings.pm file and view the code of the file. I know that this can be prevented in unix using the .htaccess deny tags, but as i am on a windows platform i cannot restrict the opening of these files.

It is very important that i restrict users from being able to see the content of mysettings.pm as it contains very sensative data, isnt there any way to actually name the module file as a .pl or something? if so how am i supposed to call it in my perl code?

Any comments would be appreciated.

Cheers
Linda

DrDoc

8:01 am on May 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Actually, you can use .htaccess on Windows too, provided they are still using Apache as the Web server.

You can also use require() instead of use to include any file. That way you could (possibly) put the file outside your Web directory...