|Subject:||Encode set unknown stat on uninitilized glob (?)|
|Date:||Fri, 10 Jul 2009 02:05:48 +0900|
|To:||bug-Encode [...] rt.cpan.org|
|From:||kpee <kpee.cpan [...] gmail.com>|
Hi, Dan. This is a low-priority-level bug(?), but please fix it because it's not feeling good. The code where this bug occurs might be and there be a bug :-). However, it is surely generated. [[ CASE A ]] Magical glob '*_' returns unknown stat when it is not initialized. A comprehensible example, type following on console $ perl -we 'print stat *_,$/' stat() on unopened filehandle _ at -e line 1. but if type below $ perl -w -MEncode -e 'print stat *_,$/' 303320610030120685930212068593021206859302 Returned value is always the same, but it is different according to the platform. It happens on both of Linux and Windows. See 'TEST ENVIRONMENT' at the end of this report. [[ CASE B ]] On Windows, every uninitialized glob (e.g. *F) returns unknown stat. @perl -w -e "print stat *F,$/" Name "main::F" used only once: possible typo at -e line 1. stat() on unopened filehandle F at -e line 1. @perl -w -MEncode -e "print stat *F,$/" Name "main::F" used only once: possible typo at -e line 1. 303320610030120685930212068593021206859302 Returned value is the same as the case of *_. And, @perl -w -MEncode -e "stat 'foo';print stat *F,$/" Name "main::F" used only once: possible typo at -e line 1. 20332061002516124713303112471507961247133031 returns stat of 'foo'. [[ TEST ENVIRONMENT ]] * Encode-2.33, perl-v5.10.0 built for MSWin32-x86-multi-thread (ActivePerl), Windows XP SP3 * Encode-2.12, perl- v5.8.8 built for i486-linux-gnu-thread-multi, Linux ubuntu-vm 2.6.24-18-generic(on vmware- player for Windows) [[ NOTICE ]] * I attach a simple test script. * Module 'version' also has the same bug. * These problems do not occur in Encode-2.23 + perl-v5.10.0(on ActivePerl-Windows) -- kpee <firstname.lastname@example.org>
Message body is not shown because sender requested not to inline it.