On Fri, Jan 23, 2009 at 11:11:13PM +0200, Eugene V. Lyubimkin wrote: > Package: perl-base > Version: 5.10.0-19 > Severity: wishlist > > > Hello, I spent significant amount of time today in debug to notice stupid line > like > > 'my $var = return myfunc($arg1, $arg2);', > > when of course I meant > > 'my $var = myfunc($arg1, $arg2);'. > > As assigning something a return is useless, Perl could generate a > warning there.
I forwarded this bug upstream[1], and the ticket was rejected: "> We could, but I don't think we should. This is the first time in 13 > years of using Perl that I've ever heard of someone trying to use > 'return' in the manner cited. Perhaps the documentation in 'perldoc -f > return' could use an example, but I see no need for a warning. In any > event, in the absence of a patch, I can't see taking any action on this. I agree. I’m rejecting this ticket." If you would like to persue this upstream, please do, but otherwise I propose we close this bug. Cheers, Dominic. [1] <https://rt.perl.org/rt3//Public/Bug/Display.html?id=119665 -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

