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 History Action Size Date Who Comment
Unknown file formatdiff testenv.SiePerlSupport.New.diff r1 manage 2.2 K 2002-11-21 - 20:19 UnknownUser Use this instead of previous one. Less changes.
Unknown file formatdiff testenv.SiePerlSupport.diff r2 r1 manage 2.2 K 2002-11-21 - 20:18 UnknownUser Use this instead of previous one. Less changes.
Unknown file formatdiff testenv.SiePerlSupport.v2.diff r1 manage 2.0 K 2002-11-22 - 15:50 UnknownUser Updated New.diff patch
Unknown file formatdiff testenv.SiePerlSupport.v3.diff r1 manage 2.9 K 2002-11-22 - 22:33 UnknownUser using 'eval' to determine perl type
Unknown file formatdiff testenv.SiePerlSupport.v4.diff r1 manage 2.7 K 2002-11-22 - 22:39 UnknownUser Updated to v3 with correct path in 1st line
Unknown file formatdiff testenv.SiePerlSupport.v5.diff r1 manage 3.5 K 2002-11-23 - 19:04 UnknownUser Updated to work on ActivePerl and SiePerl
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2002-11-23 - RichardDonkin
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.