Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
document X::Method::Private::Permission
- Loading branch information
Showing
2 changed files
with
94 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| =begin pod | ||
| =TITLE class X::Method::Private::Permission | ||
| class X::Method::Private::Permission does X::Comp { } | ||
| Compile time error thrown when the code contains a call to a private method | ||
| that isn't defined in the current class, and when no appropriate trusts | ||
| relation is defined that permits the private method call. | ||
| For example the code | ||
| 1!Int::foo | ||
| dies with | ||
| ===SORRY!=== | ||
| Cannot call private method 'foo' on package Int because it does not trust GLOBAL | ||
| =head1 Methods | ||
| =head2 method | ||
| method method() returns Str:D | ||
| The name of the private method | ||
| =head2 source-package | ||
| method source-package() returns Mu:D | ||
| Returns the type object that (supposedly) contains the private method. | ||
| =head2 calling-package | ||
| method calling-package() returns Mu:D | ||
| Returns the package in which the calling code is, and which the source package | ||
| does not trust. | ||
| =end pod |