Skip Menu |
Report information
Id: 132779
Status: open
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: zebra__crossing86 [at] hotmail.com
Cc:
AdminCc:

Operating System: Win32
PatchStatus: (no value)
Severity: low
Type: core
Perl Version: (no value)
Fixed In: (no value)



From: Matthew Sale <zebra__crossing86 [...] hotmail.com>
To: "perlbug [...] perl.org" <perlbug [...] perl.org>
Date: Mon, 29 Jan 2018 05:26:40 +0000
Subject: Testing for a directory handle bug
Download (untitled) / with headers
text/plain 218b

Good Day Perl bug testers


In the course of trying to solve some programming issues, I and the perl monks may have uncovered a bug

See below perl monks forum entry

https://www.perlmonks.org/?node_id=1208018



Matt

RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 561b
On Mon, 29 Jan 2018 05:26:49 GMT, zebra__crossing86@hotmail.com wrote: Show quoted text
> Good Day Perl bug testers > > > In the course of trying to solve some programming issues, I and the > perl monks may have uncovered a bug > > See below perl monks forum entry > > https://www.perlmonks.org/?node_id=1208018 >
Since there's a fair amount of back-and-forth discussion in that thread, it's not easy to see what the bug is precisely. Could you please post in *this* ticket a concise description of the problem? Thank you very much. -- James E Keenan (jkeenan@cpan.org)
From: <sisyphus1 [...] optusnet.com.au>
To: <perlbug-followup [...] perl.org>
Date: Tue, 30 Jan 2018 10:50:36 +1100
Subject: Re: [perl #132779] Testing for a directory handle bug
CC: <perl5-porters [...] perl.org>
Download (untitled) / with headers
text/plain 1.3k
Show quoted text
-----Original Message----- From: James E Keenan via RT Sent: Tuesday, January 30, 2018 2:56 AM To: OtherRecipients of perl Ticket #132779: Cc: perl5-porters@perl.org Subject: [perl #132779] Testing for a directory handle bug
>> See below perl monks forum entry >> >> https://www.perlmonks.org/?node_id=1208018 >>
> > Could you please post in *this* ticket a concise description of the > problem?
I'm not the OP but the problem is that, on MS Windows, '-X DIRHANDLE' produces a fatal error 'The dirfd function is unimplemented'. (At least, this happens when '-X' is either '-f' or '-d'.) This has been the case beginning with perl-5.8.9. On 5.8.8 (and earlier ?) '-d DIRHANDLE' and '-f DIRHANDLE' would simply always silently return false. On perl-5.27.8: #################### C:\_32>perl -le "opendir $d, 'comp' or die $!; print 'ok';" ok C:\_32>perl -le "opendir $d, 'comp' or die $!; print 'dir' if -d $d;" The dirfd function is unimplemented at -e line 1. C:\_32>perl -le "opendir D, 'comp' or die $!; print 'dir' if -d D;" The dirfd function is unimplemented at -e line 1. C:\_32>perl -le "opendir D, 'comp' or die $!; print 'dir' if -d \*D;" The dirfd function is unimplemented at -e line 1. #################### And no mention of any such behaviour (afaics) in either the -X documentation or the perlport documentation. Is there really no way to implement '-X DIRHANDLE' on Windows ? Cheers, Rob
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 387b
On Mon, 29 Jan 2018 15:51:21 -0800, sisyphus wrote: Show quoted text
> Is there really no way to implement '-X DIRHANDLE' on Windows ?
For -f and -d, considering that perl *knows* whether it is a directory handle, it probably is possible. It shouldn’t even require a system call. But, then, I really haven’t thought through the consequences, and I am not a Windows user. -- Father Chrysostomos


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

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org