We relaunched the TWiki.org project with an expanded TWiki charter, and we invite you to participate! The TWiki.org Code of Conduct agreement took effect on 27 Oct 2008. We ask existing twiki.org users to opt-in. You need to opt-in to participate in the Blog, Codev, Plugins and TWiki webs. -- PeterThoeny - 27 Oct 2008
You are here: TWiki> Codev Web>SiePerlSupportForTestenv (23 Nov 2002, RichardDonkin)
Tags:
create new tag
, view all tags

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

Topic attachments
I Attachment Action Size Date Who Comment
elsediff testenv.SiePerlSupport.New.diff manage 2.2 K 21 Nov 2002 - 20:19 GururajUpadhye Use this instead of previous one. Less changes.
elsediff testenv.SiePerlSupport.diff manage 2.2 K 21 Nov 2002 - 20:18 GururajUpadhye Use this instead of previous one. Less changes.
elsediff testenv.SiePerlSupport.v2.diff manage 2.0 K 22 Nov 2002 - 15:50 RichardDonkin Updated New.diff patch
elsediff testenv.SiePerlSupport.v3.diff manage 2.9 K 22 Nov 2002 - 22:33 GururajUpadhye using 'eval' to determine perl type
elsediff testenv.SiePerlSupport.v4.diff manage 2.7 K 22 Nov 2002 - 22:39 GururajUpadhye Updated to v3 with correct path in 1st line
elsediff testenv.SiePerlSupport.v5.diff manage 3.5 K 23 Nov 2002 - 19:04 RichardDonkin Updated to work on ActivePerl and SiePerl
Topic revision: r4 - 23 Nov 2002 - 19:06:00 - RichardDonkin
 
TWIKI.NET
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback