Skip to content

Instantly share code, notes, and snippets.

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;
@0racle
0racle / Bla.pm6
Created October 26, 2018 04:18 — forked from FCO/Bla.pm6
Exportation Exploration
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" }
@0racle
0racle / p6.p6
Created September 15, 2016 02:26 — forked from zoffixznet/p6.p6
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 {