* Father Chrysostomos via RT <perlbug-followup@perl.org> [2013-11-08T20:55:13] > Also, do we want do foo() to have its logical behaviour of passing the return > value of foo to do-file? Or should it be a syntax error? > > (The latter is the type of question we should always ask when removing a > feature.) Right now, the situation is already lousy: ~$ perl -Mwarnings -e 'sub z { return 0 } do z()' Use of "do" to call subroutines is deprecated at -e line 1. ~$ perl -Mwarnings -e 'sub x { return 0 } do x()' My assumption has always been that the 'x' operator is interfering. Anyway, I think we're better off simply eliminating the special case of `do SUB(LIST)`, meaning it would fall back to EXPR. On the other hand, I think this is where the question of backcompat will come in. If there's code with `do foo($x)` out in the wild, and it becomes equivalent to `do(do { foo($X) })`, something stupid is going to happen somewhere. I imagine we may be doing the world a favor by inserting a period of fatality. -- rjbsThread Previous | Thread Next