summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDivay Prakash <divayprakash@users.noreply.github.com>2019-08-10 23:27:12 +0530
committerGitHub <noreply@github.com>2019-08-10 23:27:12 +0530
commit7f4e0992939fc3c24656d317fee62713af1fdd94 (patch)
tree20a15a3afd59e6a33a73b2e2014a67a1be33ec80
parente8dd50b85e93f1baf0c909f2716177e052672ff5 (diff)
parentc709f1dcbbc3f21d8aca2102fd74f9304753b775 (diff)
Merge pull request #3594 from Sadrak/master
[perl6/en] Object Model example mixed old/new code/comments
-rw-r--r--perl6.html.markdown8
1 files changed, 4 insertions, 4 deletions
diff --git a/perl6.html.markdown b/perl6.html.markdown
index 6b0df0d4..1304869b 100644
--- a/perl6.html.markdown
+++ b/perl6.html.markdown
@@ -885,7 +885,7 @@ say_dyn(); #=> 1 100 We changed the value of $*dyn_scoped_2 in
class Human {
has Str $.name; # `$.name` is immutable but with an accessor method.
- has Str $.bcountry; # Use `$!bplace` to modify it inside the class.
+ has Str $.bcountry; # Use `$!bcountry` to modify it inside the class.
has Str $.ccountry is rw; # This attribute can be modified from outside.
has Int $!age = 0; # A private attribute with default value.
@@ -911,12 +911,12 @@ class Human {
}
};
-## Create a new instance of Human class with $.attrib set to 5.
+## Create a new instance of Human class.
## Note: you can't set private-attribute from here (more later on).
my $person1 = Human.new(
name => "Jord",
- bcountry = "Iceland",
- ccountry => "Iceland"
+ bcountry = "Togo",
+ ccountry => "Togo"
);
say $person1.name; #=> Jord