Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit cd5c4ea

Browse files
committed
Fix bad perlcperl.pod example
Closes GH #401. Detected by Miroslav Popov
1 parent 47a51b1 commit cd5c4ea

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.git-rr-cache

Submodule .git-rr-cache updated 1170 files

pod/perlcperl.pod

+3-3
Original file line numberDiff line numberDiff line change
@@ -311,16 +311,16 @@ With perl5 upstream all arguments are copied only, as with C<my $arg1 = shift;>
311311
alternate syntax for fast C<$_[0]> access is not provided. So they have to keep
312312
the otherwise unneeded C<@_> array around.
313313

314-
cperl uses C<\$name> to denote references to scalar lvalues, which change the
314+
cperl uses C<\$name> to denote references to scalar lvalues, which changes the
315315
calling variable.
316316

317-
sub myfunc(int \$i) : int { $i++; }
317+
sub myfunc(int \$i) : int { ++$i; }
318318
my $i;
319319
print myfunc($i); => 1
320320
print $i; => 1
321321

322322
For now scalar lvalue references only, C<\@a> or C<\%h> would be nice with
323-
type checks for arrayref or hashref. maybe C<\[$]> also.
323+
type checks for arrayref or hashref. Maybe C<\[$]> also.
324324

325325
=item B<< Improve C<@_> handling >>
326326

0 commit comments

Comments
 (0)