This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LedgerFromFile {...}; | |
class LedgerFromPkg {...}; | |
class Ledger { | |
proto method new {*} | |
multi method new(:$file!) { LedgerFromFile.new(:$file) } | |
multi method new(:$pkg!) { LedgerFromPkg.new(:$pkg) } | |
} | |
class LedgerFromFile { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Exportable; | |
sub bla is exportable { "bla" } | |
sub ble is exportable { "ble" } | |
sub bli is exportable { "bli" } | |
sub blo is exportable { "blo" } | |
sub blu is exportable { "blu" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6.d; | |
class A { | |
has $!a = 'private'; | |
method !a { $!a } | |
} | |
multi sub trait_mod:<is>(Mu:U \obj, :$spying!) { | |
A.^add_trustee(obj); | |
A.^compose; |