Okay, I seriously have to see an example of a submethod in use. BUILD
etc. don't count. Why? Because:
class Foo {
method BUILD () { say "foo" }
}
class Bar is Foo {
submethod BUILD () { say "bar" }
}
class Baz is Bar { }
Foo.new; # foo
Bar.new; # foo bar
Baz.new; # foo bar
If the submethod property of BUILD were actually doing anything, then
we should expect it to read like this:
Foo.new; # foo
Bar.new; # bar
Baz.new; # foo
So I don't see how the constructor is a submethod[1]. And I can't
come up with any examples of where I would want to use a submethod.
Can someone else?
Luke
[1] Yes, yes, I understand that .new is calling BUILDALL, which is
then calling the BUILDs individually. I'm saying that the fact that
BUILD is a submethod isn't changing anything one bit.