This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Document return to be exempt from the looks-like-a-function rule, like dump, goto...
authorEric Brine <ikegami@adaelis.com>
Fri, 27 Jul 2012 22:54:24 +0000 (18:54 -0400)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 27 Jul 2012 23:12:38 +0000 (16:12 -0700)
pod/perlfunc.pod

index b7dde3d..b76da4a 100644 (file)
@@ -5903,6 +5903,10 @@ scalar context, and (of course) nothing at all in void context.
 or do FILE automatically returns the value of the last expression
 evaluated.)
 
+Unlike most named operators, this is also exempt from the
+looks-like-a-function rule, so C<return ("foo")."bar"> will
+cause "bar" to be part of the argument to C<return>.
+
 =item reverse LIST
 X<reverse> X<rev> X<invert>