Skip to content

Instantly share code, notes, and snippets.

@autarch
Created November 8, 2015 17:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save autarch/e07cfcd2a30eb384e6d6 to your computer and use it in GitHub Desktop.
Save autarch/e07cfcd2a30eb384e6d6 to your computer and use it in GitHub Desktop.
use v6;
unit module App::insucalc;
subset Dir of IO::Handle where *.d;
sub MAIN( Dir :$root = $*HOME.child('.insucalc') ) is export {
App::insucalc::Runner.new( :root($root) ).run();
}
class App::insucalc::Runner {
my class App::insulcalc::Plan { }
my class App::insulcalc::Scenario { }
has Dir $!root where { $root.d };
has App::insulcalc::Plan @!plans;
has App::insulcalc::Scenario @!scenarios;
method run {
say "Root = $!root"
}
}
@autarch
Copy link
Author

autarch commented Nov 8, 2015

Gives me

===SORRY!=== Error while compiling /home/autarch/projects/App-insucalc/lib/App/insucalc.pm6
Variable '$root' is not declared. Did you mean '&roots'?
at /home/autarch/projects/App-insucalc/lib/App/insucalc.pm6:15
------>     has Dir $!root where { ⏏$root.d };
  from ./bin/insulcalc:6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment