mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-24 01:51:38 +00:00
Merge pull request #2076 from tlvb/p6-packages-foobar
[perl 6] changed code output to as stated in comments
This commit is contained in:
commit
bd96b562a0
@ -803,9 +803,8 @@ module Foo::Bar {
|
||||
my sub unavailable { # `my sub` is the default
|
||||
say "Can't access me from outside, I'm my !";
|
||||
}
|
||||
say ++$n; # increment the package variable and output its value
|
||||
}
|
||||
|
||||
say ++$n; # lexically-scoped variables are still available
|
||||
}
|
||||
say $Foo::Bar::n; #=> 1
|
||||
Foo::Bar::inc; #=> 2
|
||||
|
Loading…
Reference in New Issue
Block a user