Edelbaer has asked for the wisdom of the Perl Monks concerning the following question:
Hello believers,
I am new to PERL and currently try to gain some ground. My current problem is to use a class property for a SAY statement inside the class like:
class A { has Str $.x ; say 'Test' say $!x ; }
However, that does not seem to work and I do not really understand why.
Anybody with profound knowledge in this respect ?
KR
Edelbaer
2018-06-03 Athanasius added [Perl6] to title and code tags to body text
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: say variable in Class
by mr_ron (Deacon) on Jun 02, 2018 at 17:34 UTC | |
by Edelbaer (Initiate) on Jun 02, 2018 at 18:12 UTC | |
by Laurent_R (Canon) on Jun 03, 2018 at 16:32 UTC | |
|
Re: say variable in Class
by Discipulus (Canon) on Jun 02, 2018 at 16:49 UTC | |
by Anonymous Monk on Jun 05, 2018 at 00:53 UTC |