Subject: | amd64 perl 5.8.x on scalar string fh |
Date: | Sat, 02 Oct 2010 08:34:05 +1000 |
To: | bug-File-Map [...] rt.cpan.org |
From: | Kevin Ryde <user42 [...] zip.com.au> |
I've been getting some cpantesters fails for my locate iterator using
File::Map (0.29 and thereabouts) on an amd64 with perl 5.8.3 and 5.8.7,
File-Locate-Iterator-16:
- x86_64-linux-ld / 5.8.3:
- FAIL http://www.cpantesters.org/cpan/report/9dc823d6-cc29-11df-a635-c4330210580f
- x86_64-linux-thread-multi-ld / 5.8.7:
- FAIL http://www.cpantesters.org/cpan/report/984676e2-cc29-11df-a7f9-55330210580f
I think it's related to trying map_handle() of a scalar string handle
like
my $mystring = 'hello';
open $fh, '<', \$mystring;
map_handle ... $fh
which I expected to fail at the map_handle(), but which seems to succeed
and only later get an error on attempting to read from the mmapped
variable,
Can't overwrite an empty map at /home/sand/.cpan/build/File-Locate-Iterator-16-jGme5h/blib/lib/File/Locate/Iterator.pm line 239.
It's very possible it's all my own doing, but I haven't had a chance or
an amd64 to try to track it down, and it doesn't happen on i386, so this
is just as a "maybe it's File::Map, maybe its me". :-)
If your tests don't already exercise map_handle() on a scalar fh you
might add something to see that it throws an error, on a perl new enough
to have open() on strings ...