New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
readdir() only returns one result when used with Fatal.pm #8381
Comments
From @tomhukinsCreated by @tomhukinsFatal.pm and readdir() do not play well together. Run the following #!/usr/bin/perl use strict; use Fatal qw(readdir); my $start_dir = '.'; Perl Info
|
From @rgsTom Hukins (via RT) wrote:
Fatal will replace readdir() by this function : sub (*) { As you see, this construct forces readdir to be called in scalar We could add a wantarray() before that, but that would alter the proper use Fatal qw(open); Other ideas ? -- |
The RT System itself - Status changed from 'new' to 'open' |
From @ysthOn Thu, Mar 23, 2006 at 02:03:57PM +0100, Rafael Garcia-Suarez wrote:
*Is* there any way to detect a failed list-context readdir()? If not, |
From @rgsYitzchak Scott-Thoennes wrote:
Due to the iterative nature of readdir(), I doubt Fatal makes sense on
That would be probably the best solution, but I wonder whether other |
From @jbenjoreOn 3/23/06, Rafael Garcia-Suarez <rgarciasuarez@mandriva.com> wrote:
So hardcode the exceptions. They're well established and limited. It could be considered the responsibility of a core module like Fatal Josh |
From @rgsJoshua ben Jore wrote:
Not sure, I think all directories have always at least one entries.
Yes, seems reasonable. and patches speak louder than words :) |
From @jbenjoreOn 3/23/06, Rafael Garcia-Suarez <rgarciasuarez@mandriva.com> wrote:
I was just considering which evening I wanted to give up for this. I Josh |
From @wb8tywRafael Garcia-Suarez wrote:
OpenVMS directories can be empty and frequently are. -John |
From @rgsChange #28040 documents this as a bug in Fatal.pm. |
@rgs - Status changed from 'open' to 'resolved' |
From lallip@cs.rpi.eduCreated by lallip@cs.rpi.eduWhen using the standard Fatal module, readdir called in list $ ls temp/ To verify the normal scalar semantics are in play, I modified the When Fatal creates the new versions of these core functions, calling Perl Info
|
From @tamiasOn Thu, Aug 09, 2007 at 07:02:43AM -0700, lallip @ cs. rpi. edu wrote:
Here's the debug output from Fatal: # _make_fatal: sub=main::readdir pkg=main name=readdir void=0 sub (*) { Obviously, that code is not going to work for readdir(). perldoc Fatal: "Fatal" provides a way to conveniently replace functions which readdir() can return a false value on success (either a file named '0', or Ronald |
The RT System itself - Status changed from 'new' to 'open' |
From @rgsOn 09/08/07, via RT lallip @ cs. rpi. edu <perlbug-followup@perl.org> wrote:
That has been documented as a known bug, not fixable; see bug #38790 |
From jns@gellyfish.comOn Thu, 2007-08-09 at 18:48 +0200, Rafael Garcia-Suarez wrote:
Would it be possible to change the documentation for Fatal to make it /J\ |
From @rgsOn 09/08/07, Jonathan Stowe <jns@gellyfish.com> wrote:
Certainly, if someone provides a better wording for that "BUGS" section I added. |
Migrated from rt.perl.org#38790 (status was 'resolved')
Searchable as RT38790$
The text was updated successfully, but these errors were encountered: