Skip to content

Commit

Permalink
Eliminating erroneous examples
Browse files Browse the repository at this point in the history
This closes #2700. Also eliminates a few paragraphs below that did not work either.
  • Loading branch information
JJ committed Mar 28, 2019
1 parent 99c20ef commit a198ad4
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions doc/Language/packages.pod6
Expand Up @@ -96,7 +96,9 @@ PROCESS Process-related globals (superglobals). The last place dynamic varia
COMPILING Lexical symbols in the scope being compiled
=end table
X«|CALLER (package)»X«|CALLERS (package)»X«|DYNAMIC (package)»X«|OUTER (package)»X«|OUTERS (package)»X«|LEXICAL (package)»X«|UNIT (package)»X«|SETTING (package)»X«|PARENT (package)»X«|CLIENT (package)»
X«|CALLER (package)»X«|CALLERS (package)»X«|DYNAMIC (package)»
X«|OUTER (package)»X«|OUTERS (package)»X«|LEXICAL (package)»
X«|UNIT (package)»X«|SETTING (package)»X«|PARENT (package)»X«|CLIENT (package)»
The following relative names are also reserved but may be used
anywhere in a name:
Expand Down Expand Up @@ -154,7 +156,7 @@ $::($foobar) # $Foo::Bar
@::($foobar)baz # ILLEGAL at compile time (no operator baz)
@::($foo)::($bar)::baz # @Foo::Bar::baz
An initial C<::> doesn't imply global. Here as part of the interpolation
An initial C<::> doesn't imply global; here as part of the interpolation
syntax it doesn't even imply package. After the interpolation of the
C<::()> component, the indirect name is looked up exactly as if it had
been there in the original source code, with priority given first to
Expand Down Expand Up @@ -212,25 +214,13 @@ That is, the following are all identical in meaning:
=for code :skip-test
$foo
$::{'foo'}
::{'$foo'}
$::<foo>
::<$foo>
Each of them scans lexical scopes outward, and then the current
Each of them scans the lexical scopes outward, and then the current
package scope (though the package scope is then disallowed when "strict" is
in effect).
As a result of these rules, you can write any arbitrary variable name as
either of:
=for code :skip-test
$::{'!@#$#@'}
::{'$!@#$#@'}
You can also use the C<< ::<> >> form as long as there are no spaces in the
name.
=head2 Package lookup
Subscript the package object itself as a hash object, the key of which is
Expand Down

0 comments on commit a198ad4

Please sign in to comment.