parent
c54e75331d
commit
6487214968
@ -0,0 +1 @@ |
||||
/home/Projects/kookienomicon/licenses/GPL-3.0 |
@ -0,0 +1,5 @@ |
||||
#!/usr/bin/env raku |
||||
|
||||
sub MAIN() { |
||||
|
||||
} |
@ -1,13 +0,0 @@ |
||||
# Command Line Argument Parser |
||||
|
||||
A flexible CLI parser for raku. Inspired by |
||||
[clap.rs](https://clap.rs)! |
||||
|
||||
|
||||
## Usage |
||||
|
||||
Install clap with zef! |
||||
|
||||
```console |
||||
$ zip install clap |
||||
``` |
@ -1,39 +0,0 @@ |
||||
unit module Clap; |
||||
|
||||
say "Loading clap..."; |
||||
|
||||
class Subcommand is export { |
||||
has Str $.name; |
||||
has Str $.about is rw; |
||||
|
||||
method with_name(Str $name) returns Subcommand { |
||||
return self.bless(:$name); |
||||
} |
||||
|
||||
method about(Str $about) returns Subcommand { |
||||
$!about = $about; |
||||
return self; |
||||
} |
||||
} |
||||
|
||||
class App is export { |
||||
has Str $.about is rw; |
||||
has Str $.author is rw; |
||||
has @.subs is rw = Array.new(); |
||||
|
||||
method about(Str $about) returns App { |
||||
$!about = $about; |
||||
return self; |
||||
} |
||||
|
||||
method author(Str $author) returns App { |
||||
$!author = $author; |
||||
return self; |
||||
} |
||||
|
||||
method subcommand(Subcommand $cmd) returns App { |
||||
@.subs.push($cmd); |
||||
return self; |
||||
} |
||||
} |
||||
|
@ -1,11 +0,0 @@ |
||||
use lib 'lib/Clap'; |
||||
use Clap; |
||||
|
||||
my $app = App.new() |
||||
.about("This is some about text") |
||||
.author("Katharina Fey <kookie@spacekookie.de>") |
||||
.subcommand(Subcommand |
||||
.with_name("build") |
||||
.about("Do some thing")); |
||||
|
||||
say $app; |
@ -1,7 +0,0 @@ |
||||
## kookieNOMicon manager |
||||
# |
||||
# |
||||
|
||||
sub MAIN() { |
||||
|
||||
} |
Loading…
Reference in new issue