Navigation Menu

Skip to content

Commit

Permalink
Revert "Another test"
Browse files Browse the repository at this point in the history
This reverts commit e2aa35d.
  • Loading branch information
moritz committed Dec 22, 2014
1 parent e2aa35d commit fcd4bec
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions 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')";
}

0 comments on commit fcd4bec

Please sign in to comment.