diff options
author | Adam Bard <github@adambard.com> | 2016-01-06 03:11:23 +0800 |
---|---|---|
committer | Adam Bard <github@adambard.com> | 2016-01-06 03:11:23 +0800 |
commit | bd96b562a09b6df20cd3382d7f2a4a665b6d17df (patch) | |
tree | a818b33b73de5cb33714d167fa2ff0c506314714 /perl6.html.markdown | |
parent | c543ded32980a152a51c0cecc9b88e946223ddd7 (diff) | |
parent | 5556d6e839796e06179afec99443bf0a63a23afa (diff) |
Merge pull request #2076 from tlvb/p6-packages-foobar
[perl 6] changed code output to as stated in comments
Diffstat (limited to 'perl6.html.markdown')
-rw-r--r-- | perl6.html.markdown | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/perl6.html.markdown b/perl6.html.markdown index 323bc0b3..6633b322 100644 --- a/perl6.html.markdown +++ b/perl6.html.markdown @@ -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 |