Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PPC0033: method-like calls to lexical subs #68

Merged
merged 7 commits into from
Feb 20, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add example of invalid call to public method
  • Loading branch information
haarg committed Jan 28, 2025
commit b9f90b7f3795ea8d9b86bd860a761147038621af
5 changes: 4 additions & 1 deletion ppcs/ppc0033-ampersand-method-calls.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,11 @@ package Foo {
my $foo = Foo->new;
$foo->public;

# this is an error, as there is no sub named private in scope
# this is an error, as there is no sub named "private" in scope
$foo->&private;

# this is also an error, as "public" does not exist in the current scope
$foo->&public;
```

## Prototype Implementation
Expand Down