summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAdam Bard <github@adambard.com>2016-01-06 03:11:23 +0800
committerAdam Bard <github@adambard.com>2016-01-06 03:11:23 +0800
commitbd96b562a09b6df20cd3382d7f2a4a665b6d17df (patch)
treea818b33b73de5cb33714d167fa2ff0c506314714
parentc543ded32980a152a51c0cecc9b88e946223ddd7 (diff)
parent5556d6e839796e06179afec99443bf0a63a23afa (diff)
Merge pull request #2076 from tlvb/p6-packages-foobar
[perl 6] changed code output to as stated in comments
-rw-r--r--perl6.html.markdown3
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