develooper Front page | perl.perl6.users | Postings from June 2018

Re: mixin syntax: does vs but

Thread Previous | Thread Next
Timo Paulssen
June 13, 2018 01:35
Re: mixin syntax: does vs but
Message ID:
You can override WHAT with a method, you just have to use a syntax
that's not literally .WHAT, like this:

    class Test { method WHAT() { say "i'm here" } }; Test."WHAT"();
    # → i'm here

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About