Skip to content

Commit a31dd22

Browse files
committed
add example of calling a lexical variable
1 parent 8bfeb77 commit a31dd22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ppcs/ppc0033-ampersand-method-calls.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ When using a lexical sub inside an object class, the subs must be called as
1919
`method($object, @args)`. This works, but for many people, this feels wrong
2020
as a way to call something thought of as a private method. This has resulted
2121
in some people using syntax like `$object->${\&method}(@args)`, or continuing
22-
to use code refs stored in a lexical variable.
22+
to use code refs stored in a lexical variable (`$object->$method(@args)`).
2323

2424
## Rationale
2525

0 commit comments

Comments
 (0)