Subject: | SubKeyNames fails in German Windows XP, unless Win32::WinError is installed |
Date: | Sat, 04 Oct 2008 14:40:59 +0200 |
To: | bug-Win32-TieRegistry [...] rt.cpan.org |
From: | "Adrian Aichner" <adrian [...] elisp.de> |
Show quoted text
> Try to include any information you think might help the developer
> isolate, reproduce and fix your problem.
Hi!
I am merely point out a somewhat un-obvious failure mechanism which
others seem to have stumbled across as well, judging from error
messages reported.
I have not seen the failure mode described anywhere, so here goes my
analysis.
It would be great if the failure mode could be made more obvious by a
more meaningful error message or other means.
Would it make sense for Win32::TieRegistry to just plain out REQUIRE
Win32::WinError?
@subkey successfully collects all timezone subkeys with
sub _enumSubKeys
{
in TieRegistry.pm.
Then we hit:
if( ! _NoMoreItems() ) {
The problem is the German error message not matching the expected
English version in the absence of module Win32::WinError!
DB<34> p $_NoMoreItems
^No more data
DB<35> p _ErrNum
203
DB<36> p _ErrMsg
Das System konnte die eingegebene Umgebungsoption nicht finden.
DB<37> p _ErrMsg
Das System konnte die eingegebene Umgebungsoption nicht finden.
DB<38>
I'm willing to discuss and test alternatives to improve the situation,
possibly even provide a patch.
Regards!
Adrian
Show quoted text>
> Be sure to include at least the following information:
>
> * Distribution name and version (For example, "DBIx-SearchBuilder-0.46")
> * Perl version (Find this by running the command perl -v)
I use Strawberry Perl 5.10.0.2
This is perl, v5.10.0 built for MSWin32-x86-multi-thread
Copyright 1987-2007, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
Strawberry Perl 5.8.8.2 shows the same.
Show quoted text> * Operating System vendor and version (Find this by running the
> command uname -a)
Betriebssystemname Microsoft Windows XP Professional
Version 5.1.2600 Service Pack 3 Build 2600
Systemtyp X86-basierter PC
Gebietsschema Deutschland
Hardwareabstraktionsebene Version = "5.1.2600.5512 (xpsp.080413-2111)"
Zeitzone Westeuropäische Sommerzeit
Show quoted text>
> Other things that are often helpful:
>
> * Details about your operating environment that might be related
> to the issue being described
Show quoted text> * Exact cut and pasted error or warning messages
Can't use an undefined value as an ARRAY reference at c:/strawberry/perl/site/lib/Win32/TieRegistry.pm line 714.
Show quoted text> * The shortest, clearest code you can manage to write which
> reproduces the bug described.
1. Run on a non-English Windows XP installation WITHOUT
Win32::WinError module installed (or moved out of the way):
2. Following code will err with above error message in my module version
$PACK = 'Win32::TieRegistry'; # Used in error messages.
$VERSION = '0.25'; # Released 2006-03-23
use DateTime;
my $tz = DateTime::TimeZone->new( name => "local" );
3. Now install/restore the Win32::WinError module and the code will
work without error.
Show quoted text> * A patch against the latest released version of this distribution
> which fixes this bug.
None.
--
Adrian Aichner
mailto:adrian@elisp.de