Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reverts commit e2aa35d.
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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')"; | ||
} |