I just re-read your question and saw your emphasis on "non-static" context.
I'm not 100% sure what you are looking for, but take a look at *BUILD:*
http://docs.perl6.org/language/objects#Submethods
LL
On Wed, Oct 28, 2015 at 2:31 PM, TS xx wrote:
> Hello fellow perl
Hi Emiliano,
You could do this:
class Person {
has $.name;
method new($name) {
# do some things
self.bless(:$name);
}
}
class Employee is Person {
my $counter = 1;
method new () {
# Employees don't have individual identities so we give them a name
:(
On 10/28/2015 08:03 AM, Patrick R. Michaud wrote:
On Wed, Oct 28, 2015 at 03:31:09AM +, TS xx wrote:
Can I call the Person's constructor (in non static context),
pass the required parameter and do more things before returning?
There are two answers to this question, both of which likely
Hello fellow perl users,
I have been trying to understand perl 6 oop implementation, and one thing I
still can't figure out is how to call super class methods from lower classes.
Let's say we have two classes, Person and Employee, and the method I am trying
to access is the object constructor: