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
readline argument list is messed up #15706
Comments
From @maukeCreated by @mauke$ perl -wE 'say prototype "CORE::readline"' readline claims to take a single (optional) scalar argument. $ perl -wE 'sub foo (;*); foo("a", "b", "c")' This is what happens when you use the same prototype on a sub. $ perl -wE 'say readline("a", "b", "c")' This is what happens when you try it with readline: Only the last argument is $ perl -wE 'say readline(1 .. 10)' Despite what the prototype claims, the argument is evaluated in list context. $ perl -wE 'say "foo", "bar", readline(())' If you call it with an empty list, it steals arguments from the surrounding Perl Info
|
From @jkeenanOn Sat, 12 Nov 2016 15:13:51 GMT, mauke- wrote:
Is this problem similar to that reported by sprout in https://rt-archive.perl.org/perl5/Ticket/Display.html?id=93992? -- |
The RT System itself - Status changed from 'new' to 'open' |
From @arcJames E Keenan via RT <perlbug-followup@perl.org> wrote:
No — #93992 is about how Perl should handle subroutine declarations This ticket relates to the fact that the readline() builtin claims to FWIW, my recollection is that mauke was working on #130076 at the hackathon. Thanks. -- |
Migrated from rt.perl.org#130076 (status was 'open')
Searchable as RT130076$
The text was updated successfully, but these errors were encountered: