Bug: testenv script failed when using SiePerl.
The testenv script failed to run when running under
SiePerl.
Test case
Installed
SiePerl first. Then follow instructions in
WindowsInstallCookbook to install Twiki on windows. Run the latest testenv script.
Environment
TWiki version: |
Version: 01 Dec 2001 |
TWiki plugins: |
Standard |
Server OS: |
Windows 2000 |
Web server: |
Apache/1.3.23 (Win32) mod_perl/1.26 |
Perl version: |
SiePerl v5.6.1 built for MSWin32-x86 |
Client OS: |
Windows 2000 |
Web Browser: |
IE 6.0 |
--
GururajUpadhye - 21 Nov 2002
Follow up
Hi - Thanks for the patch and for following the evolving
PatchGuidelines! Unfortunately this breaks the BuildNumber call on
ActivePerl, which is important due to some
ActivePerl bugs. This is because
$^O
on
ActivePerl produces the same as
SiePerl, i.e.
MSWin32
. Is there some way of having a Perl script identify that it is using
SiePerl not
ActivePerl? If so, that would let
testenv
avoid calling the
ActivePerl routines when they are not available.
Alternatively, a patch that does the
Win32:BuildNumber
call early on, in an
eval "string"
, could be used to detect whether an
MSWin32
Perl is
ActivePerl. This is probably the best option - see the other
eval
calls in this script for some examples.
I'll attach an updated version of your patch that applies cleanly - the first filename in the diff should be
testenv
, otherwise patch doesn't know what filename to apply the patch to. I have also deleted the first part of the patch, which changed the
#!
pathname on the first line - patches shouldn't include this, since the TWiki standard paths is
/usr/bin/perl
.
--
RichardDonkin - 22 Nov 2002
Thanks for point out that it does not work on
ActivePerl. I have updated the script using eval, as you suggested. It works on
SiePerl. I have used the
$perlver
variable to hold the
SiePerl string and check it wherever its different from
ActivePerl. With this approach, the code may not look clean, but output surely does. I have also attached the new diff file.
--
GururajUpadhye - 22 Nov 2002
Fix record
Now fixed in
TWikiAlphaRelease, based on your patches - thanks! Should now work on any Win32 Perl, not just
ActivePerl and
CygWin Perl.
Final version of patch is below. Latest
testenv
is at
CVSget:bin/testenv as always, and we now have nightly alpha ZIP/tar files, see
AlphaTesting.
Just FYI, it should be possible to install another version of Perl alongside
SiePerl, but that obviously wastes space and it wasn't too hard to do this.
--
RichardDonkin - 23 Nov 2002
See attachment table dates for latest version of patch.
See also
HowToConfigureForSiePerl.
Category:
TWikiPatches