LPM: Many Monkeys - conditional use

David Hempy hempy at ket.org
Thu Mar 23 23:50:47 CST 2000


This question has nothing to do with Win32, so don't get scared off just yet...

Okay, feeling pretty smug about my Win32::FileSecurity solution, I synched 
up my programs on my laptop (Win98) with the server (WinNT).  No big 
surprise that Win32::FileSecurity doesn't work on Win98, right?

So I added the following at the top of my subs that use those routines:

>         unless (Win32::FsType() =~ /NTFS/) {
>                 #print "Can't do permissions here...it's as safe
>                         as its going to get.\n ";
>                 return 1;
>         }

Figure this covers me if I'm on Win9x, as well as if it runs under WinNT on 
a FAT partition.  Also groovy if Win200x uses NTFS.

Well, I still get the following error:

>C:\ket\cgi-ket\cds>perl -c genpage.pl
>The Win32::FileSecurity module works only on Windows NT at genpage.pl line 28
>BEGIN failed--compilation aborted at genpage.pl line 28.

Well, here's line 28:

>use Win32::FileSecurity;

So, I changed it to:

>if (Win32::IsWinNT()) {
>         use Win32::FileSecurity;
>}

...so that it won't even try to use it if we're not running on WinNT.

Still get the same error.  (grr...)


I don't really want/need to get into makefiles and such, as it will only 
ever run on our server for real...I just like to write code on the beach, 
so it's got to run on the laptop.


So, any ideas?

-dave


--
David Hempy
Internet Database Administrator
Kentucky Educational Television
<hempy at ket.org> -- (606)258-7164 -- (800)333-9764




More information about the Lexington-pm mailing list