-
Notifications
You must be signed in to change notification settings - Fork 584
sort SUBNAME LIST #7376
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
Comments
From [email protected]Created by [email protected]perl -wle 'sub foo { return 1..5} print sort foo(8)' while a bit annoying (I wanted to sort the result of foo applied to 8), 5.6.1 this will reportedly behaves the same (I don't have a 5.6.1 anymore) More interesting: I see nothing in the sort docs that would make me expect a change in And on 5.6.1 it actually didn't matter: So you get an extra warning and it behaves the same as without the If you don't agree with me that these are bugs, this behaviour should at Perl Info
|
From @schwern
5.6.2 does.
I don't think print is the right analogy here. map and grep have the
I don't know if its a bug so much as an ambiguity made espcially tricky sort foo(8) # call foo(8) and hand the results to sort And before the C<func (arg)> style camp objects, its not working |
The RT System itself - Status changed from 'new' to 'open' |
From [email protected]Created by [email protected]I believe that "sort fn( EXPR, EXPR )" is mistakenly being parsed Unexpected: Key2 Key1 KeyB KeyD KeyC KeyA KeyB KeyC #--------------------- snip snip snip ------------------ I believe that the "sort SUBNAME LIST" interpretation is incorrect because 1) 'perldoc perlop', in terms "Terms and List Operators (Leftward)" 2) If I had wanted a "sort fn( EXPR, EXPR )" to be parsed as 3) schwern says so. :-) Perl Info
|
From [email protected]$ perl-5.6.1 -wle 'sub foo { return 1..5} print sort(foo(8))' $ perl-5.8.0 -wle 'sub foo { return 1..5} print sort(foo(8))' Bisect: sub foo { return 1..5 } ----Output of ...l/pxZYtEz/perl-5.7.0@8238/bin/perl---- ----EOF ($?='0')---- ----EOF ($?='0')---- http://perl5.git.perl.org/perl.git/commit/ Re: [ID 19991001.003] sort(sub(arg)) misparsed as sort sub args p4raw-id: //depot/perl@8239 This was an intended change of behaviour. See [perl #1549]. A patch to update the documentation and add more examples has been => Setting this one to resolved. |
[email protected] - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#30377 (status was 'resolved')
Searchable as RT30377$
The text was updated successfully, but these errors were encountered: