Question
I have set up Active Perl (build 628) on three machines running Win32. On one machine (
W2K pro) the testenv script executes without any problem. On the two others (NT4,
W2K server), I systematically get the following error : "The getpwuid function is unimplemented at d:\twiki\testenv line 41."
After some research in
ActiveState doc, it seems that some system functions used in the testenv script, such as getpwuid, are not implemented on Win32 platforms.
So why do they execute well on the first
Win32 machine ?
How can I have them execute as well on the two others ?
- TWiki version: dec 2000
- Web server: Apache 1.3
- Server OS: WinNT4 and W2K
--
JeromeBouvattier - 19 Aug 2001
Answer
Well, found it. On the first computer, perl.exe reffered to cygwin/bin/perl.exe and not activeperl/bin/perl.exe. It seems that getpwuid is implemented in the cygwin port. It returns the current user's name.
This leads me to the following questions. Should I work with the Cygwin Perl or with
ActiveState Perl and comment out getpwuid and other group functions in testenv for testing purpose ?
What difference between the two ports could affect Twiki's usage ?
--
JeromeBouvattier - 19 Aug 2001
This is a good question. Should we be recommending
ActiveState Perl or Cygwin Perl? If it is to be
ActiveState then the getpwuid function should not be used on Windows Platforms.
I hacked out the line in testenv.pl
my $usr = getpwuid( $< );
replacing it with
my $usr = "";
Also took out:
$grp = getgrgid( $_ );
replaced with
$grp = "";
Just so the rest of the script would work.
--
MartinCleaver - 26 Sep 2001
Like Martin I've disabled these parts of
testenv. Maybe
testenv should be a bit modified to cope with the not working of these functions, and some of the documentation...
I wouldn't know wether to recommend
ActiveState or
CygWin perl to be used, only because
ActiveState doesn't support the functions only used in
testenv.
--
HansDonner - 26 Sep 2001
There's a fixed version of
testenv over at
CookbookActivePerlTestenv, which also provides more info on your Perl version and environment.
I have got both
ActiveState and Cygwin Perl working OK with testenv and the rest of TWiki - I prefer Cygwin because the setup's a little easier and there's no need to patch testenv. See
WindowsInstallCookbook for the full story.
--
RichardDonkin - 24 Feb 2002