Skip Menu |
 

This queue is for tickets about the Win32-TieRegistry CPAN distribution.

Report information
The Basics
Id: 39818
Status: resolved
Priority: 0/
Queue: Win32-TieRegistry

People
Owner: Nobody in particular
Requestors: adrian [...] elisp.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.28



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>
Download (untitled) / with headers
text/plain 3.2k
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
Subject: Re: [rt.cpan.org #39818] SubKeyNames fails in German Windows XP, unless Win32::WinError is installed
Date: Wed, 15 Oct 2008 00:03:56 -0700
To: bug-Win32-TieRegistry [...] rt.cpan.org
From: "Tye McQueen" <tye.mcqueen [...] gmail.com>
Download (untitled) / with headers
text/plain 1.1k
On Sat, Oct 4, 2008 at 5:49 AM, adrian@elisp.de via RT < bug-Win32-TieRegistry@rt.cpan.org> wrote: Show quoted text
> > 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?
Yes, much of the support for working without some key features, such as a useful $^E and the Win32::WinError module should be dropped now. For this module, I am currently in the middle of a rather long-running round of reconciling several different sources of improvements to it (very long-running due to only rarely finding the time to work on that project, in part because another project is the work to make this type of thing much easier for me to do). So a simple patch would be appreciated. A complex patch would likely only be useful as a suggestion since the most up-to-date incarnation of this module is not something currently available nor something that I will be likely to make available at the moment. Though, my hope is to fairly soon have the module so you can even apply patches yourself. Thanks, Tye
CC: adrian [...] elisp.de
Subject: Re: [rt.cpan.org #39818] SubKeyNames fails in German Windows XP, unless Win32::WinError is installed
Date: Thu, 16 Oct 2008 12:57:03 +0200
To: bug-Win32-TieRegistry [...] rt.cpan.org
From: Adrian Aichner <adrian [...] elisp.de>
Download (untitled) / with headers
text/plain 3.3k
"Tye McQueen via RT" <bug-Win32-TieRegistry@rt.cpan.org> writes: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=39818 > > > On Sat, Oct 4, 2008 at 5:49 AM, adrian@elisp.de via RT < > bug-Win32-TieRegistry@rt.cpan.org> wrote: >
>> >> 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?
> > > Yes, much of the support for working without some key features, such as a > useful $^E and the Win32::WinError module should be dropped now. > > For this module, I am currently in the middle of a rather long-running round > of reconciling several different sources of improvements to it (very > long-running due to only rarely finding the time to work on that project, in > part because another project is the work to make this type of thing much > easier for me to do). > > So a simple patch would be appreciated. A complex patch would likely only
Hello Tye, thanks for sharing an outlook on the future of Win32::TieRegistry. I'm unsure of the general direction a simple patch should take. Would it make sense to fall back to the numeric values of the errors handled in the module when Win32::WinError is not available? How about somthing like the following? if ( eval { require Win32::WinError } ) { $_NoMoreItems = Win32::WinError::constant("ERROR_NO_MORE_ITEMS",0); $_FileNotFound = Win32::WinError::constant("ERROR_FILE_NOT_FOUND",0); $_TooSmall = Win32::WinError::constant("ERROR_INSUFFICIENT_BUFFER",0); $_MoreData = Win32::WinError::constant("ERROR_MORE_DATA",0); } else { my $_NoMoreItems = &Errno::ERROR_NO_MORE_ITEMS; my $_FileNotFound = &Errno::ERROR_FILE_NOT_FOUND; my $_TooSmall = &Errno::ERROR_INSUFFICIENT_BUFFER; my $_MoreData = &Errno::ERROR_MORE_DATA; } Best regards! Adrian Show quoted text
> be useful as a suggestion since the most up-to-date incarnation of this > module is not something currently available nor something that I will be > likely to make available at the moment. > > Though, my hope is to fairly soon have the module so you can even apply > patches yourself. > > Thanks, > Tye > > On Sat, Oct 4, 2008 at 5:49 AM, adrian@elisp.de via RT < > bug-Win32-TieRegistry@rt.cpan.org> wrote: > > 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? > > Yes, much of the support for working without some key features, such as a > useful $^E and the Win32::WinError module should be dropped now. > > For this module, I am currently in the middle of a rather long-running round > of reconciling several different sources of improvements to it (very > long-running due to only rarely finding the time to work on that project, in > part because another project is the work to make this type of thing much > easier for me to do). > > So a simple patch would be appreciated. A complex patch would likely only be > useful as a suggestion since the most up-to-date incarnation of this module is > not something currently available nor something that I will be likely to make > available at the moment. > > Though, my hope is to fairly soon have the module so you can even apply > patches yourself. > > Thanks, > Tye >
-- Adrian Aichner mailto:adrian@elisp.de
Subject: Re: [rt.cpan.org #39818] SubKeyNames fails in German Windows XP, unless Win32::WinError is installed
Date: Fri, 17 Oct 2008 00:06:12 +1100
To: bug-Win32-TieRegistry [...] rt.cpan.org
From: "Adam Kennedy" <adamkennedybackup [...] gmail.com>
Download (untitled) / with headers
text/plain 2.5k
WinError looks well maintained and safe, should I just make the dependency enforced? Adam K 2008/10/15 Tye McQueen via RT <bug-Win32-TieRegistry@rt.cpan.org>: Show quoted text
> Queue: Win32-TieRegistry > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=39818 > > > On Sat, Oct 4, 2008 at 5:49 AM, adrian@elisp.de via RT < > bug-Win32-TieRegistry@rt.cpan.org> wrote: >
>> >> 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?
> > > Yes, much of the support for working without some key features, such as a > useful $^E and the Win32::WinError module should be dropped now. > > For this module, I am currently in the middle of a rather long-running round > of reconciling several different sources of improvements to it (very > long-running due to only rarely finding the time to work on that project, in > part because another project is the work to make this type of thing much > easier for me to do). > > So a simple patch would be appreciated. A complex patch would likely only > be useful as a suggestion since the most up-to-date incarnation of this > module is not something currently available nor something that I will be > likely to make available at the moment. > > Though, my hope is to fairly soon have the module so you can even apply > patches yourself. > > Thanks, > Tye > > > On Sat, Oct 4, 2008 at 5:49 AM, adrian@elisp.de via RT <bug-Win32-TieRegistry@rt.cpan.org> wrote:
>> >> 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?
> > > Yes, much of the support for working without some key features, such as a useful $^E and the Win32::WinError module should be dropped now. > > For this module, I am currently in the middle of a rather long-running round of reconciling several different sources of improvements to it (very long-running due to only rarely finding the time to work on that project, in part because another project is the work to make this type of thing much easier for me to do). > > So a simple patch would be appreciated. A complex patch would likely only be useful as a suggestion since the most up-to-date incarnation of this module is not something currently available nor something that I will be likely to make available at the moment. > > Though, my hope is to fairly soon have the module so you can even apply patches yourself. > > Thanks, > Tye > > >
Subject: Re: [rt.cpan.org #39818] SubKeyNames fails in German Windows XP, unless Win32::WinError is installed
Date: Thu, 16 Oct 2008 16:01:10 +0200
To: bug-Win32-TieRegistry [...] rt.cpan.org
From: Adrian Aichner <adrian [...] elisp.de>
Download (untitled) / with headers
text/plain 3.2k
"Adam Kennedy via RT" <bug-Win32-TieRegistry@rt.cpan.org> writes: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=39818 > > > WinError looks well maintained and safe, should I just make the > dependency enforced?
Hi Adam! A concern I would have with this approach is breaking existing installations. People upgrading Win32::TieRegistry to such a fix might be taken aback by failures of existing scripts. They can fix this easily by installing Win32::WinError as well, but it might come as an unpleasant side-effect of the upgrade, taking additional time. Are there any CPAN module policies or guidelines about this kind of thing? Adrian Show quoted text
> > Adam K > > 2008/10/15 Tye McQueen via RT <bug-Win32-TieRegistry@rt.cpan.org>:
>> Queue: Win32-TieRegistry >> Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=39818 > >> >> On Sat, Oct 4, 2008 at 5:49 AM, adrian@elisp.de via RT < >> bug-Win32-TieRegistry@rt.cpan.org> wrote: >>
>>> >>> 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?
>> >> >> Yes, much of the support for working without some key features, such as a >> useful $^E and the Win32::WinError module should be dropped now. >> >> For this module, I am currently in the middle of a rather long-running round >> of reconciling several different sources of improvements to it (very >> long-running due to only rarely finding the time to work on that project, in >> part because another project is the work to make this type of thing much >> easier for me to do). >> >> So a simple patch would be appreciated. A complex patch would likely only >> be useful as a suggestion since the most up-to-date incarnation of this >> module is not something currently available nor something that I will be >> likely to make available at the moment. >> >> Though, my hope is to fairly soon have the module so you can even apply >> patches yourself. >> >> Thanks, >> Tye >> >> >> On Sat, Oct 4, 2008 at 5:49 AM, adrian@elisp.de via RT <bug-Win32-TieRegistry@rt.cpan.org> wrote:
>>> >>> 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?
>> >> >> Yes, much of the support for working without some key features, such as a useful $^E and the Win32::WinError module should be dropped now. >> >> For this module, I am currently in the middle of a rather long-running round of reconciling several different sources of improvements to it (very long-running due to only rarely finding the time to work on that project, in part because another project is the work to make this type of thing much easier for me to do). >> >> So a simple patch would be appreciated. A complex patch would likely only be useful as a suggestion since the most up-to-date incarnation of this module is not something currently available nor something that I will be likely to make available at the moment. >> >> Though, my hope is to fairly soon have the module so you can even apply patches yourself. >> >> Thanks, >> Tye >> >> >>
> >
-- Adrian Aichner mailto:adrian@elisp.de
Subject: Re: [rt.cpan.org #39818] SubKeyNames fails in German Windows XP, unless Win32::WinError is installed
Date: Thu, 16 Oct 2008 08:02:36 -0700
To: bug-Win32-TieRegistry [...] rt.cpan.org
From: "Tye McQueen" <tye.mcqueen [...] gmail.com>
Download (untitled) / with headers
text/plain 434b
On Thu, Oct 16, 2008 at 6:06 AM, Adam Kennedy wrote: Show quoted text
> WinError looks well maintained and safe, should I just make the > dependency enforced? >
Yes, that is exactly what I was referring to when I said: 2008/10/15 Tye McQueen via RT <bug-Win32-TieRegistry@rt.cpan.org>: Show quoted text
> > Yes, much of the support for working without some key features, such as a > > useful $^E and the Win32::WinError module should be dropped now.
>
Thanks, Tye
From: bdimych
Download (untitled) / with headers
text/plain 452b
Hi! I've encountered this bug and have some thoughts 1) it seems that other bugs https://rt.cpan.org/Public/Bug/Display.html?id=32598 https://rt.cpan.org/Public/Bug/Display.html?id=25102 actually the same thing 2) imho it should be mentioned in the manual in the BUGS section something like "Several functions fail on non-english system if Win32::WinError is not installed. The error message is: Can't use an undefined value as an ARRAY reference"
Download (untitled) / with headers
text/plain 958b
On Mon Sep 24 13:13:33 2012, https://www.google.com/accounts/o8/id?id=AItOawlUWH9bcXS1vuMY08GeMTtCbnnqAMRinig wrote: Show quoted text
> Hi! > > I've encountered this bug and have some thoughts > > 1) it seems that other bugs > https://rt.cpan.org/Public/Bug/Display.html?id=32598 > https://rt.cpan.org/Public/Bug/Display.html?id=25102 > actually the same thing > > 2) imho it should be mentioned in the manual > in the BUGS section something like > "Several functions fail on non-english system if Win32::WinError is not > installed. > The error message is: Can't use an undefined value as an ARRAY reference" >
The problem is with Win32API::Registry. See some good analysis here: https://rt.perl.org/Public/Bug/Display.html?id=123207 The only solution is to patch Win32API::Registry. The author seems a little unresponsive (see https://rt.cpan.org/Ticket/Display.html?id=37750.) If someone who knows XS would like to offer to take it over I think that would be best.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.