From fcd4becc0fdf463ac8fd2497cb5273965319338d Mon Sep 17 00:00:00 2001 From: Moritz Lenz Date: Mon, 22 Dec 2014 11:06:19 +0100 Subject: [PATCH] Revert "Another test" This reverts commit e2aa35df198abc215a60c7ee1598759499ee7f34. --- util/new-type.p6 | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 util/new-type.p6 diff --git a/util/new-type.p6 b/util/new-type.p6 new file mode 100644 index 0000000000..9647d18a73 --- /dev/null +++ b/util/new-type.p6 @@ -0,0 +1,40 @@ +use v6; + +sub MAIN($typename, :$kind='class') { + my @path-chunks = $typename.split('::'); + my $filename = @path-chunks.pop ~ '.pod'; + my $path = 'lib/Type'; + for @path-chunks -> $c { + $path ~= "/$c"; + unless $path.IO.d { + mkdir $path.IO.mkdir; + } + } + + $path ~= "/$filename"; + + spurt $path.IO, Q:s:to/TEMPLATE/; + =begin pod + + =TITLE $kind $typename + + =SUBTITLE ... + + $kind $typename is SuperClass { ... } + + Synopsis goes here + + =head1 Methods + + =head2 method flurb + + method flurb($typename:D: *@args --> Str) + + method description here + + =end pod + TEMPLATE + + say "'$path' written"; + say "(remeber to 'git add $path')"; +}