-
Notifications
You must be signed in to change notification settings - Fork 1
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
.next-handle seems to change handles but doesn't #6676
Comments
From @briandfoy#!/Users/brian/bin/perl6s/perl6-latest I'm playing with .next-handle from IO::CatHandle. I'm quietly { Here's a test file: First With one or more command-line arguments I get this odd behavior (and test.txt:1 First It does "switch" after five lines, but then it keeps reading from the I expected that it would close the current handle, open a new one, and The docs for .next-handle lets you keep changing it as long as you This is Rakudo Star version 2018.01 built on MoarVM version 2018.01 |
From @briandfoyI can fix this by closing the old file handle and checking the new quietly { |
From @zoffixznetOn Mon, 19 Feb 2018 16:15:37 -0800, comdog wrote:
This is because current implementation of IO::CatHandle.lines simply flattens I think if we give IO::CatHandle!LINES and IO::CatHandle!WORDS their own In the meantime, you can use `.get` instead: my $limit := 3; I also noticed another deficiency: when trying to set .on-switch on $*ARGFILES, Not sure what can be done about it, but I filed it as |
The RT System itself - Status changed from 'new' to 'open' |
From @zoffixznetOn Mon, 19 Feb 2018 19:48:30 -0800, cpan@zoffix.com wrote:
Side note: it could be handy to be able to loop over IO::CatHandle's handles. for $*ARGFILES.handles -> $fh { Filed that as rakudo/rakudo#1546 |
Migrated from rt.perl.org#132885 (status was 'open')
Searchable as RT132885$
The text was updated successfully, but these errors were encountered: