Skip to content

Instantly share code, notes, and snippets.

@0racle
Forked from zoffixznet/p6.p6
Created September 15, 2016 02:26
Show Gist options
  • Save 0racle/ce073d4c1beae585aac0290954c8f946 to your computer and use it in GitHub Desktop.
Save 0racle/ce073d4c1beae585aac0290954c8f946 to your computer and use it in GitHub Desktop.
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 {
has Str $.file is required;
};
class LedgerFromPkg {
has Str $.pkg is required;
}
Ledger.new(:file<mario>).say;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment